TF-1363: [Presentation] Fix margin for SpamReportBannerMobile and add check condition UnreadSpamNumber

This commit is contained in:
HuyNguyen
2023-01-16 17:35:53 +07:00
committed by Dat H. Pham
parent 04fd640384
commit 272a36fdbc
6 changed files with 160 additions and 251 deletions
@@ -28,11 +28,15 @@ class GetUnreadSpamMailboxInteractor {
final _checkTimeCondition = (_timeLast.inHours > 0) && (_timeLast.inHours > conditionsForDisplayingSpamReportBanner);
if (true) {
if (_checkTimeCondition) {
final _response = await _spamReportRepository.getUnreadSpamMailbox(accountId, mailboxFilterCondition: mailboxFilterCondition, limit: limit);
final _unreadSpamMailbox = _response.unreadSpamMailbox;
yield Right(GetUnreadSpamMailboxSuccess(_unreadSpamMailbox!));
if (_unreadSpamMailbox!.unreadEmails!.value.value > 0) {
yield Right(GetUnreadSpamMailboxSuccess(_unreadSpamMailbox));
} else {
yield Left(InvalidSpamReportCondition());
}
} else {
yield Left(InvalidSpamReportCondition());
}
@@ -1535,8 +1535,9 @@ class MailboxDashBoardController extends ReloadableController {
}
}
void storeSpamReportStateAction(SpamReportState spamReportState) {
spamReportController.storeSpamReportStateAction(spamReportState);
void storeSpamReportStateAction() {
final _storeSpamReportState = enableSpamRepot ? SpamReportState.disabled : SpamReportState.enabled;
spamReportController.storeSpamReportStateAction(_storeSpamReportState);
}
@override