Skip to content

Commit

Permalink
Allow for switches in stateonpartial (#10230)
Browse files Browse the repository at this point in the history
  • Loading branch information
strseb authored Jan 29, 2025
1 parent c066391 commit 27b1048
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,12 +782,13 @@ void Controller::disconnected() {

if (nextStep == None &&
(m_state == StateSilentSwitching || m_state == StateSwitching)) {
// If we are only silently switching, keep the iniator
// If we are only switching, keep the iniator
// Else move the iniator to Client User
// as the extension cannot switch servers.
auto target_iniator = m_state == StateSilentSwitching
? m_initiator
: ActivationPrincipal::ClientUser;
auto target_iniator =
(m_state == StateSilentSwitching || m_state == StateSwitching)
? m_initiator
: ActivationPrincipal::ClientUser;
activate(m_nextServerData, target_iniator, m_nextServerSelectionPolicy);
return;
}
Expand Down
5 changes: 3 additions & 2 deletions src/ui/screens/home/ViewHome.qml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ MZFlickable {
descriptionText: qsTrId("vpn.servers.currentLocation").arg(
VPNCurrentServer.localizedExitCityName)

disableRowWhen: (VPNController.state !== VPNController.StateOn
&& VPNController.state !== VPNController.StateOff)
disableRowWhen: (VPNController.state !== VPNController.StateOn &&
VPNController.state !== VPNController.StateOnPartial &&
VPNController.state !== VPNController.StateOff)
Layout.topMargin: 12
contentChildren: [

Expand Down

0 comments on commit 27b1048

Please sign in to comment.