Track "SubState" of systemd service correctly
Due to short-circuing the previous code might not have taken a changed "SubState" into account. This change should fix it and therefore might fix https://github.com/Martchus/syncthingtray/issues/179.
This commit is contained in:
parent
76209e2922
commit
0f6ea4f88e
|
@ -484,11 +484,12 @@ void SyncthingService::handlePropertiesChanged(
|
||||||
#endif
|
#endif
|
||||||
handlePropertyChanged(m_activeSince, QStringLiteral("ActiveEnterTimestamp"), changedProperties, invalidatedProperties);
|
handlePropertyChanged(m_activeSince, QStringLiteral("ActiveEnterTimestamp"), changedProperties, invalidatedProperties);
|
||||||
|
|
||||||
const bool wasRunningBefore = isRunning();
|
const auto wasRunningBefore = isRunning();
|
||||||
if (handlePropertyChanged(
|
const auto activeStateChanged = handlePropertyChanged(
|
||||||
m_activeState, &SyncthingService::activeStateChanged, QStringLiteral("ActiveState"), changedProperties, invalidatedProperties)
|
m_activeState, &SyncthingService::activeStateChanged, QStringLiteral("ActiveState"), changedProperties, invalidatedProperties);
|
||||||
|| handlePropertyChanged(
|
const auto subStateChanged
|
||||||
m_subState, &SyncthingService::subStateChanged, QStringLiteral("SubState"), changedProperties, invalidatedProperties)) {
|
= handlePropertyChanged(m_subState, &SyncthingService::subStateChanged, QStringLiteral("SubState"), changedProperties, invalidatedProperties);
|
||||||
|
if (activeStateChanged || subStateChanged) {
|
||||||
emit stateChanged(m_activeState, m_subState, m_activeSince);
|
emit stateChanged(m_activeState, m_subState, m_activeSince);
|
||||||
}
|
}
|
||||||
const bool currentlyRunning = isRunning();
|
const bool currentlyRunning = isRunning();
|
||||||
|
|
Loading…
Reference in New Issue