fix(circles): rewrite context menu to compute state at click time ins…#242
Merged
defnax merged 1 commit intodefnax:circles-v1from Mar 30, 2026
Merged
fix(circles): rewrite context menu to compute state at click time ins…#242defnax merged 1 commit intodefnax:circles-v1from
defnax merged 1 commit intodefnax:circles-v1from
Conversation
…tead of relying on stale global flags
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.
Fix: Circle editor context menu broken
Root cause:
MembershipListCustomPopupMenu relied on 3 global booleans (am_I_invited, am_I_pending, am_I_circle_admin) computed once at load time, and used tr("Invited") text comparison for logic. This caused empty or wrong menus depending on timing and circle state.
Fix: Rewrote the function to be self-contained — all state is computed at right-click time:
rsIdentity->isOwnId() → is this my ID?
rsGxsCircles->getCircleDetails() → fresh subscription flags
mCircleGroup.mMeta.mAuthorId == chosenId → am I admin?
Also moved am_I_circle_admin calculation out of the loop in updateMembership().
No global flags or translated text used in menu logic anymore.