feat: Make possible to report a thread or message as phishing from spam folder#2883
feat: Make possible to report a thread or message as phishing from spam folder#2883FabianDevel merged 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
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 = falseis set when registering thereportPhishingTriggerobserver (called fromonViewCreated), so simply opening this bottom sheet will immediately exit multi-select mode. This is very likely unintended; instead, setisMultiSelectOn = falseonly when the phishing action completes (inside theobserve { ... }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 = falseis 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 thereportPhishingTrigger.observe { ... }block (and/or guard it withshouldCloseMultiSelection) 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.
ee70bf0 to
d3c2320
Compare
There was a problem hiding this comment.
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.
e0656ad to
a85ffae
Compare
There was a problem hiding this comment.
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.
a85ffae to
233a9d3
Compare
|



No description provided.