Hide spam banner when we are in spam
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -177,8 +177,18 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
|||||||
Obx(() {
|
Obx(() {
|
||||||
final spamController = controller.spamReportController;
|
final spamController = controller.spamReportController;
|
||||||
|
|
||||||
if (spamController.spamReportState.value == SpamReportState.disabled ||
|
final isSpamReportDisabled = spamController.spamReportState.value == SpamReportState.disabled;
|
||||||
spamController.presentationSpamMailbox.value == null) {
|
|
||||||
|
final isSpamFolderSelected = controller
|
||||||
|
.selectedMailbox
|
||||||
|
.value
|
||||||
|
?.isSpam == true;
|
||||||
|
|
||||||
|
final isPresentationSpamMailboxIsNull = spamController.presentationSpamMailbox.value == null;
|
||||||
|
|
||||||
|
if (isSpamReportDisabled ||
|
||||||
|
isPresentationSpamMailboxIsNull ||
|
||||||
|
isSpamFolderSelected) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,8 +115,19 @@ class ThreadView extends GetWidget<ThreadController>
|
|||||||
.mailboxDashBoardController
|
.mailboxDashBoardController
|
||||||
.spamReportController;
|
.spamReportController;
|
||||||
|
|
||||||
if (spamController.spamReportState.value == SpamReportState.disabled ||
|
final isSpamReportDisabled = spamController.spamReportState.value == SpamReportState.disabled;
|
||||||
spamController.presentationSpamMailbox.value == null) {
|
|
||||||
|
final isSpamFolderSelected = controller
|
||||||
|
.mailboxDashBoardController
|
||||||
|
.selectedMailbox
|
||||||
|
.value
|
||||||
|
?.isSpam == true;
|
||||||
|
|
||||||
|
final isPresentationSpamMailboxIsNull = spamController.presentationSpamMailbox.value == null;
|
||||||
|
|
||||||
|
if (isSpamReportDisabled ||
|
||||||
|
isPresentationSpamMailboxIsNull ||
|
||||||
|
isSpamFolderSelected) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user