Skip to content

fix(circles): rewrite context menu to compute state at click time ins…#242

Merged
defnax merged 1 commit intodefnax:circles-v1from
jolavillette:Fix_PR3174_6
Mar 30, 2026
Merged

fix(circles): rewrite context menu to compute state at click time ins…#242
defnax merged 1 commit intodefnax:circles-v1from
jolavillette:Fix_PR3174_6

Conversation

@jolavillette
Copy link
Copy Markdown

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.

@defnax defnax merged commit 46685c4 into defnax:circles-v1 Mar 30, 2026
1 check failed
@jolavillette jolavillette deleted the Fix_PR3174_6 branch April 2, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants