TF-1362: [Presentation] : Implement StoreLastTimeDismissed and show detail for spam report banner

This commit is contained in:
HuyNguyen
2023-01-13 12:45:30 +07:00
committed by Dat Vu
parent 46b50842ce
commit cd04a1b8d0
22 changed files with 335 additions and 225 deletions
@@ -6,11 +6,11 @@ import 'package:tmail_ui_user/features/mailbox_dashboard/data/local/share_prefer
import 'package:tmail_ui_user/features/mailbox_dashboard/domain/model/unread_spam_emails_response.dart';
import 'package:tmail_ui_user/main/exceptions/exception_thrower.dart';
class LocalSpamReportDataSourceImpl extends SpamReportDataSource {
class SharePreferenceSpamReportDataSourceImpl extends SpamReportDataSource {
final SharePreferenceSpamReportDataSource _sharePreferenceSpamReportDataSource;
final ExceptionThrower _exceptionThrower;
LocalSpamReportDataSourceImpl(this._sharePreferenceSpamReportDataSource, this._exceptionThrower);
SharePreferenceSpamReportDataSourceImpl(this._sharePreferenceSpamReportDataSource, this._exceptionThrower);
@override
Future<DateTime> getLastTimeDismissedSpamReported() async {
return Future.sync(() async {
@@ -27,7 +27,7 @@ class SpamReportDataSourceImpl extends SpamReportDataSource {
}
) {
return Future.sync(() async {
final _unreadSpamEmailsResponse = await _spamReportApi.findNumberOfUnreadSpamEmails(
final _unreadSpamEmailsResponse = await _spamReportApi.getUnreadSpamEmailbox(
accountId, mailboxFilterCondition: mailboxFilterCondition, limit: limit);
return _unreadSpamEmailsResponse;
}).catchError((error) {