Prevent disconnected notification on startup

Happened when Syncthing notifications were
available before the connection was established
This commit is contained in:
Martchus 2016-12-18 16:44:16 +01:00
parent 76ccd5fd1f
commit 3f95d72b79
2 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,7 @@ set(META_APP_DESCRIPTION "Tray application for Syncthing")
set(META_APP_CATEGORIES "System;Utility;Network;FileTransfer")
set(META_VERSION_MAJOR 0)
set(META_VERSION_MINOR 2)
set(META_VERSION_PATCH 0)
set(META_VERSION_PATCH 1)
set(META_VERSION_EXACT_SONAME ON)
project(${META_PROJECT_NAME})

View File

@ -183,6 +183,10 @@ void TrayIcon::showSyncthingNotification(ChronoUtilities::DateTime when, const Q
void TrayIcon::updateStatusIconAndText(SyncthingStatus status)
{
if(!m_initialized || m_status == status) {
return;
}
const SyncthingConnection &connection = trayMenu().widget()->connection();
const auto &settings = Settings::values();
switch(status) {