Fix Leave option not shown when Delete option is visible for group channels#6416
Draft
VelikovPetar wants to merge 1 commit intodevelopfrom
Draft
Fix Leave option not shown when Delete option is visible for group channels#6416VelikovPetar wants to merge 1 commit intodevelopfrom
Leave option not shown when Delete option is visible for group channels#6416VelikovPetar wants to merge 1 commit intodevelopfrom
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
Contributor
SDK Size Comparison 📏
|
|
Leave and Delete options together for group channels
Leave and Delete options together for group channelsLeave option not shown when Delete option is visible for group channels
gpunto
approved these changes
May 6, 2026
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.



Goal
For group channels where the current user has both
leave-channelanddelete-channelcapabilities (typically channel owners/admins), the channel info screen and the Compose channel-list options menu were only surfacing Delete and hiding Leave. Users want to be able to leave a group they own without having to delete it for everyone.This change makes both options available whenever the user has the corresponding capability.
Implementation
ChannelInfoViewController.buildChannelOptionList: appendsLeaveChannelwheneverleave-channelcapability is present, and independently appendsDeleteChannelwhendelete-channelis present (previously the two were mutually exclusive viaif/else).ChannelOptions.buildGroupChannelActions(Compose channel-list bottom sheet): showsLeaveGroupwhenevercanLeaveChannel, dropping the&& !canDeleteChannelexclusion.ChannelInfoOptionButton: replaces theCompositionLocalProvider(LocalContentColor = accentError)wrapper with an explicitdestructive: Booleanparameter that drives icontintand textcolor(buttonDestructiveTextvstextSecondary/textPrimary). Call sites forBlockUser,LeaveChannel, andDeleteChannelpass the appropriate flag —LeaveChannelandDeleteChannelare destructive,BlockUseris not.ChannelInfoViewControllerTest: existing owner-capabilities test updated to expect bothLeaveChannelandDeleteChannelin the option list.ChannelInfoOptionItemTest(direct + group, light + dark) andDirectChannelInfoContentTestto reflect the explicit destructive coloring.Testing
ChannelInfoViewControllerTestcovers the owner case (both capabilities → both options listed).