TF-2564 Change logic empty folder (Spam/Trash) to avoid cache still has data

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2024-02-07 01:24:15 +07:00
committed by Dat PHAM HOANG
parent 1c7ecc0a50
commit 1bf7ee4f20
6 changed files with 44 additions and 59 deletions
@@ -96,7 +96,6 @@ class LocalThreadDataSourceImpl extends ThreadDataSource {
Session session,
AccountId accountId,
MailboxId mailboxId,
Future<void> Function(List<EmailId>? newDestroyed) updateDestroyedEmailCache
) {
throw UnimplementedError();
}
@@ -90,15 +90,13 @@ class ThreadDataSourceImpl extends ThreadDataSource {
Future<List<EmailId>> emptyMailboxFolder(
Session session,
AccountId accountId,
MailboxId mailboxId,
Future<void> Function(List<EmailId>? newDestroyed) updateDestroyedEmailCache
MailboxId mailboxId
) {
return Future.sync(() async {
return await _threadIsolateWorker.emptyMailboxFolder(
session,
accountId,
mailboxId,
updateDestroyedEmailCache,
mailboxId
);
}).catchError(_exceptionThrower.throwException);
}