TF-1363: [Presentation] Implement disable and enable spam report
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ class DeleteSpamReportStateInteractor {
|
||||
Stream<Either<Failure, Success>> execute() async* {
|
||||
try {
|
||||
yield Right<Failure, Success>(DeleteSpamReportStateLoading());
|
||||
await _spamReportRepository.deletestoreSpamReportState();
|
||||
await _spamReportRepository.deleteSpamReportState();
|
||||
yield Right<Failure, Success>(DeleteSpamReportStateSuccess());
|
||||
} catch (e) {
|
||||
yield Left<Failure, Success>(DeleteSpamReportStateFailure(e));
|
||||
|
||||
+2
-4
@@ -1,15 +1,13 @@
|
||||
|
||||
|
||||
import 'package:core/presentation/state/failure.dart';
|
||||
import 'package:core/presentation/state/success.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox_dashboard/domain/repository/spam_report_repository.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox_dashboard/domain/state/get_spam_report_state.dart';
|
||||
|
||||
class StoreSpamReportStateInteractor {
|
||||
class GetSpamReportStateInteractor {
|
||||
final SpamReportRepository _spamReportRepository;
|
||||
|
||||
StoreSpamReportStateInteractor(this._spamReportRepository);
|
||||
GetSpamReportStateInteractor(this._spamReportRepository);
|
||||
|
||||
Stream<Either<Failure, Success>> execute() async* {
|
||||
try {
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ class GetUnreadSpamMailboxInteractor {
|
||||
|
||||
final _checkTimeCondition = (_timeLast.inHours > 0) && (_timeLast.inHours > conditionsForDisplayingSpamReportBanner);
|
||||
|
||||
if (_checkTimeCondition) {
|
||||
if (true) {
|
||||
final _response = await _spamReportRepository.getUnreadSpamMailbox(accountId, mailboxFilterCondition: mailboxFilterCondition, limit: limit);
|
||||
final _unreadSpamMailbox = _response.unreadSpamMailbox;
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ class StoreSpamReportStateInteractor {
|
||||
try {
|
||||
yield Right<Failure, Success>(StoreSpamReportStateLoading());
|
||||
await _spamReportRepository.storeSpamReportState(spamReportState);
|
||||
yield Right<Failure, Success>(StoreSpamReportStateSuccess());
|
||||
yield Right<Failure, Success>(StoreSpamReportStateSuccess(spamReportState));
|
||||
} catch (e) {
|
||||
yield Left<Failure, Success>(StoreSpamReportStateFailure(e));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user