TF-1363: [Presentation] Fix margin for SpamReportBannerMobile and add check condition UnreadSpamNumber
This commit is contained in:
@@ -1123,9 +1123,7 @@ class MailboxController extends BaseMailboxController {
|
||||
break;
|
||||
case MailboxActions.disableSpamReport:
|
||||
case MailboxActions.enableSpamReport:
|
||||
final _currentSpamReportState = mailboxDashBoardController.enableSpamRepot;
|
||||
final _storeSpamReportState = _currentSpamReportState ? SpamReportState.disabled : SpamReportState.enabled;
|
||||
mailboxDashBoardController.storeSpamReportStateAction(_storeSpamReportState);
|
||||
mailboxDashBoardController.storeSpamReportStateAction();
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
|
||||
+6
-2
@@ -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());
|
||||
}
|
||||
|
||||
+3
-2
@@ -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
|
||||
|
||||
@@ -20,7 +20,9 @@ class SpamReportBannerWidget extends StatelessWidget {
|
||||
}
|
||||
return Container(
|
||||
height: 124,
|
||||
margin: const EdgeInsets.all(16),
|
||||
margin: const EdgeInsets.only(
|
||||
top: 12, left: 16, right: 16, bottom: 16
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: AppColor.colorBorderBodyThread, width: 1),
|
||||
|
||||
Reference in New Issue
Block a user