Skip to content

Implement multi-select chats with bulk actions in sidebar#639

Open
igitur wants to merge 2 commits into
morethanwords:masterfrom
igitur:select-multiple-chats
Open

Implement multi-select chats with bulk actions in sidebar#639
igitur wants to merge 2 commits into
morethanwords:masterfrom
igitur:select-multiple-chats

Conversation

@igitur

@igitur igitur commented May 7, 2026

Copy link
Copy Markdown

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:

  • Added multi-select state management to 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]
  • Updated DialogsContextMenu to 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:

  • Implemented PopupBulkMute popup for muting multiple chats at once, allowing the user to select mute duration.
  • Implemented PopupDeleteDialogs popup for confirming deletion of multiple chats, including an option to also delete messages for contacts.
  • Added logic in context menu to handle bulk actions and clean up selection state after actions complete.

UI and language support:

  • Added new language strings for bulk chat deletion confirmation and options.
  • Stubbed sidebar methods for entering, updating, and exiting chat selection mode, to be implemented for visual feedback.

Supporting utilities and imports:

  • Added imports for new popups and async array filtering utility. [1] [2]

These changes collectively enable efficient management of multiple chats, improving usability for users handling large numbers of dialogs.

igitur added 2 commits May 7, 2026 14:30
- 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
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.

1 participant