Skip to content

feat: Multiselect and swipe messages on search#2914

Open
solrubado wants to merge 52 commits into
protected/refactor-mail-actionsfrom
multiselect-messages-on-search
Open

feat: Multiselect and swipe messages on search#2914
solrubado wants to merge 52 commits into
protected/refactor-mail-actionsfrom
multiselect-messages-on-search

Conversation

@solrubado
Copy link
Copy Markdown
Contributor

No description provided.

@solrubado solrubado requested a review from Copilot May 27, 2026 08:19
@solrubado solrubado changed the title Multiselect messages on search feat: Multiselect messages on search May 27, 2026
@solrubado solrubado changed the title feat: Multiselect messages on search feat: Multiselect and swipe messages on search May 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the existing thread multi-selection feature to work from the Search screen by reusing the same toolbar/quick-action UI and routing actions through updated navigation args (isFromSearch) so action sheets can behave appropriately when invoked from search results.

Changes:

  • Added multiselect UI + quick action bar support to SearchFragment, and extracted the multiselect info toolbar into a reusable layout include.
  • Refactored multi-selection state (on/off + selected threads) out of MainViewModel into a dedicated MultiselectionViewModel.
  • Updated navigation/actions bottom sheets to support “from search” behavior (new isFromSearch argument) and refresh search results after actions.

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
app/src/main/res/navigation/main_navigation.xml Adds isFromSearch args + new navigation actions from search to action sheets.
app/src/main/res/layout/view_multiselection_info_toolbar.xml New reusable included toolbar layout for multiselect info/actions.
app/src/main/res/layout/fragment_thread_list.xml Replaces inline multiselect toolbar with included reusable layout.
app/src/main/res/layout/fragment_search.xml Adds included multiselect toolbar + bottom quick action bar; adjusts IDs/padding.
app/src/main/java/com/infomaniak/mail/useCases/MessagesActions.kt Adds helper to filter messages eligible for move/archive.
app/src/main/java/com/infomaniak/mail/ui/newMessage/encryption/EncryptionActionsBottomSheet.kt Updates base bottom-sheet dependency from mainViewModel to multiselectionViewModel.
app/src/main/java/com/infomaniak/mail/ui/MainViewModel.kt Removes multi-selection state previously stored in MainViewModel.
app/src/main/java/com/infomaniak/mail/ui/MainActivity.kt Back-press handling now closes multiselect via MultiselectionViewModel.
app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadFragment.kt Propagates isFromSearch when opening thread actions.
app/src/main/java/com/infomaniak/mail/ui/main/thread/encryption/UnencryptableRecipientsBottomSheetDialog.kt Updates base bottom-sheet dependency to multiselection viewmodel.
app/src/main/java/com/infomaniak/mail/ui/main/thread/DetailedContactBottomSheetDialog.kt Updates base bottom-sheet dependency to multiselection viewmodel.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/UserToBlockBottomSheetDialog.kt Updates base bottom-sheet dependency to multiselection viewmodel.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/ThreadActionsViewModel.kt Makes missing threadUid error explicit.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/ThreadActionsBottomSheetDialog.kt Adds search-specific behavior and triggers search refresh after actions.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/ReplyBottomSheetDialog.kt Updates base bottom-sheet dependency to multiselection viewmodel.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/multiselection/MultiselectionViewModel.kt New central ViewModel to manage multiselect state across hosts.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/multiselection/MultiselectionHost.kt New host interface to allow reuse of multiselect logic across fragments.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/multiselection/MultiselectionBinding.kt New binding abstraction to unify multiselect UI references.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/MultiSelectBottomSheetDialog.kt Adds isFromSearch handling and search-aware navigation to folder picker.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/MessageActionsBottomSheetDialog.kt Adds isFromSearch handling for substitute class name + multiselect vm hookup.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/MailActionsBottomSheetDialog.kt Introduces substituteClassName abstraction for upgrade bottom sheet tracking.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/AttachmentActionsBottomSheetDialog.kt Updates base bottom-sheet dependency to multiselection viewmodel.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/ActionsViewModel.kt Uses new message-filter helper before move/archive operations.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/ActionsBottomSheetDialog.kt Base class now closes multiselect through multiselectionViewModel.
app/src/main/java/com/infomaniak/mail/ui/main/search/SearchViewModel.kt Adds withContacts param to refresh/search; exposes filters.
app/src/main/java/com/infomaniak/mail/ui/main/search/SearchFragment.kt Implements MultiSelectionHost, adds multiselect + swipe handling for search results.
app/src/main/java/com/infomaniak/mail/ui/main/folderPicker/FolderPickerFragment.kt If isFromSearch, closes multiselect and refreshes search after move.
app/src/main/java/com/infomaniak/mail/ui/main/folder/TwoPaneFragment.kt Makes localSettings overridable for subclasses.
app/src/main/java/com/infomaniak/mail/ui/main/folder/ThreadListMultiSelection.kt Refactors multiselect logic to be host-agnostic (thread list + search).
app/src/main/java/com/infomaniak/mail/ui/main/folder/ThreadListFragment.kt Implements MultiSelectionHost and wires MultiselectionViewModel into adapter + UI.
app/src/main/java/com/infomaniak/mail/ui/main/folder/PerformSwipeActionManager.kt Adds a generic swipe-action API usable outside ThreadListFragment (e.g., search).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/main/java/com/infomaniak/mail/ui/main/folder/ThreadListMultiSelection.kt Outdated
Comment thread app/src/main/java/com/infomaniak/mail/ui/main/search/SearchFragment.kt Outdated
Comment thread app/src/main/java/com/infomaniak/mail/ui/main/search/SearchFragment.kt Outdated
Base automatically changed from messages-actions-use-case to protected/refactor-mail-actions May 27, 2026 09:35
@solrubado solrubado requested a review from Copilot May 27, 2026 12:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.

Comment thread app/src/main/java/com/infomaniak/mail/ui/main/folder/PerformSwipeActionManager.kt Outdated
@solrubado solrubado force-pushed the protected/refactor-mail-actions branch from 3a9597c to 5b6b752 Compare May 28, 2026 07:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.

Comment thread app/src/main/java/com/infomaniak/mail/useCases/MessagesActions.kt Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated 1 comment.

Comment thread app/src/main/res/layout/view_multiselection_info_toolbar.xml
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 1, 2026

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