Skip to content

feat: Make possible to report a thread or message as phishing from spam folder#2883

Merged
FabianDevel merged 4 commits intomainfrom
add-phishing-action-to-spam-folder
Apr 28, 2026
Merged

feat: Make possible to report a thread or message as phishing from spam folder#2883
FabianDevel merged 4 commits intomainfrom
add-phishing-action-to-spam-folder

Conversation

@solrubado
Copy link
Copy Markdown
Contributor

@solrubado solrubado commented Apr 23, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 23, 2026 13:13
@solrubado solrubado changed the title feat: Make possible to report a thread or message as phishing from spam feat: Make possible to report a thread or message as phishing from spam folder Apr 23, 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

Enables reporting a thread/message as phishing even when it originates from the Spam folder.

Changes:

  • Always display the “Phishing” action item (including in Spam).
  • Attempt to reset multi-select mode when phishing report completes (currently implemented in a way that closes multi-select too early).

Reviewed changes

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

File Description
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/ThreadActionsBottomSheetDialog.kt Makes phishing action always visible; adds multi-select reset tied to phishing result observer setup.
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/MultiSelectBottomSheetDialog.kt Adds multi-select reset tied to phishing result observer setup.
Comments suppressed due to low confidence (2)

app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/MultiSelectBottomSheetDialog.kt:261

  • mainViewModel.isMultiSelectOn = false is set when registering the reportPhishingTrigger observer (called from onViewCreated), so simply opening this bottom sheet will immediately exit multi-select mode. This is very likely unintended; instead, set isMultiSelectOn = false only when the phishing action completes (inside the observe { ... } callback) or when the user confirms the phishing report.
    private fun observeReportPhishingResult() {
        mainViewModel.isMultiSelectOn = false
        mainViewModel.reportPhishingTrigger.observe(viewLifecycleOwner) {
            descriptionDialog.resetLoadingAndDismiss()
            findNavController().popBackStack()
        }

app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/ThreadActionsBottomSheetDialog.kt:140

  • mainViewModel.isMultiSelectOn = false is executed as soon as the observer is set up (on bottom sheet creation), which will close multi-select even if the user hasn’t reported phishing. This changes UI state just by opening the dialog. Move the assignment into the reportPhishingTrigger.observe { ... } block (and/or guard it with shouldCloseMultiSelection) so multi-select is only closed when the phishing flow completes.
    private fun observeReportPhishingResult() {
        mainViewModel.isMultiSelectOn = false
        mainViewModel.reportPhishingTrigger.observe(viewLifecycleOwner) {
            descriptionDialog.resetLoadingAndDismiss()
            findNavController().popBackStack()
        }

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

@solrubado solrubado force-pushed the add-phishing-action-to-spam-folder branch 2 times, most recently from ee70bf0 to d3c2320 Compare April 23, 2026 13:48
@solrubado solrubado requested a review from Copilot April 23, 2026 13:50
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 2 out of 2 changed files in this pull request and generated 2 comments.


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

@solrubado solrubado force-pushed the add-phishing-action-to-spam-folder branch from e0656ad to a85ffae Compare April 24, 2026 14:44
@solrubado solrubado requested a review from Copilot April 24, 2026 14:49
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 3 out of 3 changed files in this pull request and generated 1 comment.


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

@FabianDevel FabianDevel enabled auto-merge April 28, 2026 07:26
@solrubado solrubado force-pushed the add-phishing-action-to-spam-folder branch from a85ffae to 233a9d3 Compare April 28, 2026 07:39
@sonarqubecloud
Copy link
Copy Markdown

@FabianDevel FabianDevel merged commit 65ba2c3 into main Apr 28, 2026
7 checks passed
@FabianDevel FabianDevel deleted the add-phishing-action-to-spam-folder branch April 28, 2026 07:45
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.

3 participants