TF-3707 Implement clear mailbox method in data and domain layer

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-05-06 15:51:59 +07:00
committed by Dat H. Pham
parent 5f6e61bde7
commit e415077738
10 changed files with 190 additions and 0 deletions
@@ -161,4 +161,9 @@ class MailboxCacheDataSourceImpl extends MailboxDataSource {
return await _mailboxCacheManager.clearAll(accountId, userName);
}).catchError(_exceptionThrower.throwException);
}
@override
Future<UnsignedInt> clearMailbox(Session session, AccountId accountId, MailboxId mailboxId) {
throw UnimplementedError();
}
}
@@ -154,4 +154,11 @@ class MailboxDataSourceImpl extends MailboxDataSource {
Future<void> clearAllMailboxCache(AccountId accountId, UserName userName) {
throw UnimplementedError();
}
@override
Future<UnsignedInt> clearMailbox(Session session, AccountId accountId, MailboxId mailboxId) {
return Future.sync(() async {
return await mailboxAPI.clearMailbox(session, accountId, mailboxId);
}).catchError(_exceptionThrower.throwException);
}
}