Skip to content

Commit

Permalink
emit signal when isDeviceConnected is true
Browse files Browse the repository at this point in the history
  • Loading branch information
Gela committed Dec 20, 2023
1 parent 192bbcd commit 596f5d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,10 @@ bool Controller::activate(const ServerData& serverData,
emit isDeviceConnectedChanged();
return false;
}
m_isDeviceConnected = true;
if (!m_isDeviceConnected) {
m_isDeviceConnected = true;
emit isDeviceConnectedChanged();
}

// Before attempting to enable VPN connection we should check that the
// subscription is active.
Expand Down
2 changes: 1 addition & 1 deletion src/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Controller : public QObject, public LogSerializer {
Q_PROPERTY(bool silentServerSwitchingSupported READ
silentServerSwitchingSupported CONSTANT);
Q_PROPERTY(bool isDeviceConnected READ isDeviceConnected NOTIFY
isDeviceConnectedChanged);
isDeviceConnectedChanged);

#ifdef MZ_DUMMY
// This is just for testing purposes. Not exposed in prod.
Expand Down

0 comments on commit 596f5d1

Please sign in to comment.