Warn user and prevent switching when no remote account is logged in - #338
Merged
suraj-yadav0 merged 5 commits intoSep 14, 2026
Merged
suraj-yadav0 merged 5 commits into
suraj-yadav0 merged 5 commits into
Conversation
suraj-yadav0
requested changes
Sep 9, 2026
suraj-yadav0
left a comment
Collaborator
There was a problem hiding this comment.
Just Remove the Unused function and its wrapper , and we are good to go..!!
AnmollGarg
force-pushed
the
fix/account-switch-validation
branch
from
September 9, 2026 12:46
8382a60 to
3f84b84
Compare
…nt-switch-validation # Conflicts: # qml/app/AppDrawer.qml # qml/app/navigation/MenuPage.qml
…ep#334) - Make NotificationPopup modal and guard open() with activeDialog reference - Guard AccountSelectorDialog open() against duplicate active dialogs - Reset activeDialog on dialog destruction and close
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prevents toggling the local account switch when no remote account is logged in, keeps the switch UI in sync, and displays a warning notification dialog to the user.
Type
Motivation
Previously, when a user had only the default Local Account (
id: 0) and attempted to flip the local toggle switch off,toggleLocalMode()inAccountSelectorDialog.qmlfell back to callingopen(selectedAccountId). This inappropriately popped open the account selection dialog instead of notifying the user. Furthermore, because no account was actually switched, none of the account change signals were fired, leaving the switch visually in theOFFstate while the app remained on the Local Account.Changes
hasRemoteAccount()inmodels/accounts.js: Queries SQLiteuserstable to determine whether any remote user account (id > 0) exists.toggleLocalMode()inAccountSelectorDialog.qml:lastRemoteAccountIdstill exists in the database.notifPopup.open()warning ("You don't have any account logged in") and returnsfalsewhen no remote account exists (targetId <= 0), replacing the previousopen()fallback.MenuPage.qml&AppDrawer.qml:accountPicker.toggleLocalMode(checked).checked = trueimmediately if toggling fails, preventing switch desynchronization.Testing
clickable build && clickable review)clickable install)Checklist
release/v1.3.3branchRelated Issues
#334
Additional Notes
Applied consistently across both the desktop/tablet sidebar (
MenuPage.qml) and the mobile drawer (AppDrawer.qml).