-
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-2143 Implement delete composed email on local storage browser afte…
…r open new tab completed
- Loading branch information
Showing
9 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
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
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
11 changes: 11 additions & 0 deletions
11
.../mailbox_dashboard/domain/state/delete_composed_email_on_local_storage_browser_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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:core/presentation/state/failure.dart'; | ||
import 'package:core/presentation/state/success.dart'; | ||
|
||
class DeleteComposedEmailOnLocalStorageBrowserLoading extends LoadingState {} | ||
|
||
class DeleteComposedEmailOnLocalStorageBrowserSuccess extends UIState {} | ||
|
||
class DeleteComposedEmailOnLocalStorageBrowserFailure extends FeatureFailure { | ||
|
||
DeleteComposedEmailOnLocalStorageBrowserFailure(dynamic exception) : super(exception: exception); | ||
} |
21 changes: 21 additions & 0 deletions
21
..._dashboard/domain/usecases/delete_composed_email_on_local_storage_browser_interactor.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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/composer_cache_repository.dart'; | ||
import 'package:tmail_ui_user/features/mailbox_dashboard/domain/state/delete_composed_email_on_local_storage_browser_state.dart'; | ||
|
||
class DeleteComposedEmailOnLocalStorageBrowserInteractor { | ||
final ComposerCacheRepository _composerCacheRepository; | ||
|
||
DeleteComposedEmailOnLocalStorageBrowserInteractor(this._composerCacheRepository); | ||
|
||
Stream<Either<Failure, Success>> execute() async* { | ||
try { | ||
yield Right<Failure, Success>(DeleteComposedEmailOnLocalStorageBrowserLoading()); | ||
await _composerCacheRepository.deleteComposedEmailOnLocalStorageBrowser(); | ||
yield Right<Failure, Success>(DeleteComposedEmailOnLocalStorageBrowserSuccess()); | ||
} catch (exception) { | ||
yield Left<Failure, Success>(DeleteComposedEmailOnLocalStorageBrowserFailure(exception)); | ||
} | ||
} | ||
} |
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
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