Implement multi-select chats with bulk actions in sidebar#639
Open
igitur wants to merge 2 commits into
Open
Conversation
- Ctrl+Click a chat to enter selection mode; additional Ctrl+Clicks toggle more chats - The currently open chat is automatically included when entering selection mode - Plain click while in selection mode exits selection and opens the clicked chat - Selected chats use the same visual style as the active (open) chat - Right-clicking a selected chat while multiple are selected shows a bulk Delete option - Bulk delete confirmation popup mirrors the single-chat UX including an 'Also delete for contacts' checkbox when any selected chat is a private user conversation - Escape / back button exits selection mode
…ntext menu - Mark as Unread: loops markDialogUnread for all selected peers - Mute: opens a new PopupBulkMute (mirrors PopupMute's time-picker UI) and applies the chosen duration to all selected peers - Archive: calls editPeerFolders with all selected peerIds in one API call
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.
This pull request introduces multi-select (bulk selection) functionality for dialogs (chats) in the sidebar, enabling users to select multiple chats and perform bulk actions such as marking as unread, muting, archiving, or deleting. It includes UI state management, context menu adjustments, and new popup dialogs for bulk actions.
Bulk selection and context menu enhancements:
AppDialogsManager, including methods to enter, update, toggle, and exit chat selection mode, and to track selected chats (selectedPeerIds,isSelectingChats). Ctrl/Cmd+Click now toggles selection, and the UI updates accordingly. [1] [2] [3]DialogsContextMenuto detect when bulk selection is active and display a special context menu with bulk actions (Mark as Unread, Mute, Archive, Delete) when right-clicking a selected chat. [1] [2] [3] [4]Bulk action implementations:
PopupBulkMutepopup for muting multiple chats at once, allowing the user to select mute duration.PopupDeleteDialogspopup for confirming deletion of multiple chats, including an option to also delete messages for contacts.UI and language support:
Supporting utilities and imports:
These changes collectively enable efficient management of multiple chats, improving usability for users handling large numbers of dialogs.