-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TF-3372 Implement Clean SPAM and TRASH folder usecase with new Empty API
- Loading branch information
Showing
4 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
11 changes: 6 additions & 5 deletions
11
lib/features/thread/domain/state/empty_spam_folder_state.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import 'package:core/presentation/state/failure.dart'; | ||
import 'package:core/presentation/state/success.dart'; | ||
import 'package:jmap_dart_client/jmap/mail/email/email.dart'; | ||
|
||
class EmptySpamFolderLoading extends LoadingState {} | ||
|
||
class EmptySpamFolderSuccess extends UIState { | ||
|
||
final List<EmailId> emailIds; | ||
|
||
EmptySpamFolderSuccess(this.emailIds); | ||
EmptySpamFolderSuccess(); | ||
|
||
@override | ||
List<Object?> get props => [emailIds]; | ||
List<Object?> get props => []; | ||
} | ||
|
||
class EmptySpamFolderFailure extends FeatureFailure { | ||
|
||
EmptySpamFolderFailure(dynamic exception) : super(exception: exception); | ||
} | ||
|
||
class CannotEmptySpamFolderException implements Exception { | ||
CannotEmptySpamFolderException(); | ||
} |
11 changes: 6 additions & 5 deletions
11
lib/features/thread/domain/state/empty_trash_folder_state.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import 'package:core/presentation/state/failure.dart'; | ||
import 'package:core/presentation/state/success.dart'; | ||
import 'package:jmap_dart_client/jmap/mail/email/email.dart'; | ||
|
||
class EmptyTrashFolderLoading extends LoadingState {} | ||
|
||
class EmptyTrashFolderSuccess extends UIState { | ||
|
||
final List<EmailId> emailIds; | ||
|
||
EmptyTrashFolderSuccess(this.emailIds); | ||
EmptyTrashFolderSuccess(); | ||
|
||
@override | ||
List<Object?> get props => [emailIds]; | ||
List<Object?> get props => []; | ||
} | ||
|
||
class EmptyTrashFolderFailure extends FeatureFailure { | ||
|
||
EmptyTrashFolderFailure(dynamic exception) : super(exception: exception); | ||
} | ||
|
||
class CannotEmptyTrashException implements Exception { | ||
CannotEmptyTrashException(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters