TF-82 Discard email drafts

This commit is contained in:
dab246
2022-02-21 13:55:19 +07:00
committed by Dat H. Pham
parent ea29405f08
commit a2ffd9b354
14 changed files with 186 additions and 27 deletions
@@ -88,11 +88,20 @@ class EmailDataSourceImpl extends EmailDataSource {
}
@override
Future<bool> saveEmailAsDrafts(AccountId accountId, Email email) {
Future<Email?> saveEmailAsDrafts(AccountId accountId, Email email) {
return Future.sync(() async {
return await emailAPI.saveEmailAsDrafts(accountId, email);
}).catchError((error) {
throw error;
});
}
@override
Future<bool> removeEmailDrafts(AccountId accountId, EmailId emailId) {
return Future.sync(() async {
return await emailAPI.removeEmailDrafts(accountId, emailId);
}).catchError((error) {
throw error;
});
}
}