Fix mark as mailbox, empty trash do not reconnect when get 401 error
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -90,7 +90,6 @@ class MailboxIsolateWorker {
|
||||
await HiveCacheConfig.instance.setUp();
|
||||
|
||||
List<EmailId> emailIdsCompleted = List.empty(growable: true);
|
||||
try {
|
||||
bool mailboxHasEmails = true;
|
||||
UTCDate? lastReceivedDate;
|
||||
EmailId? lastEmailId;
|
||||
@@ -143,9 +142,6 @@ class MailboxIsolateWorker {
|
||||
sendPort.send(emailIdsCompleted);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
log('MailboxIsolateWorker::_handleMarkAsMailboxRead(): ERROR: $e');
|
||||
}
|
||||
log('MailboxIsolateWorker::_handleMarkAsMailboxRead(): TOTAL_READ: ${emailIdsCompleted.length}');
|
||||
return emailIdsCompleted;
|
||||
}
|
||||
@@ -158,7 +154,6 @@ class MailboxIsolateWorker {
|
||||
StreamController<Either<Failure, Success>> onProgressController
|
||||
) async {
|
||||
List<EmailId> emailIdsCompleted = List.empty(growable: true);
|
||||
try {
|
||||
bool mailboxHasEmails = true;
|
||||
UTCDate? lastReceivedDate;
|
||||
EmailId? lastEmailId;
|
||||
@@ -215,9 +210,6 @@ class MailboxIsolateWorker {
|
||||
countRead: emailIdsCompleted.length)));
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
log('MailboxIsolateWorker::_handleMarkAsMailboxReadActionOnWeb(): ERROR: $e');
|
||||
}
|
||||
log('MailboxIsolateWorker::_handleMarkAsMailboxReadActionOnWeb(): TOTAL_READ: ${emailIdsCompleted.length}');
|
||||
return emailIdsCompleted;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,6 @@ class ThreadIsolateWorker {
|
||||
EmptyMailboxFolderArguments args,
|
||||
TypeSendPort sendPort
|
||||
) async {
|
||||
try {
|
||||
final rootIsolateToken = args.isolateToken;
|
||||
BackgroundIsolateBinaryMessenger.ensureInitialized(rootIsolateToken);
|
||||
await HiveCacheConfig.instance.setUp();
|
||||
@@ -127,10 +126,6 @@ class ThreadIsolateWorker {
|
||||
}
|
||||
log('ThreadIsolateWorker::_emptyMailboxFolderAction(): TOTAL_REMOVE: ${emailListCompleted.length}');
|
||||
return emailListCompleted;
|
||||
} catch (e) {
|
||||
logError('ThreadIsolateWorker::_emptyMailboxFolderAction(): ERROR: $e');
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<EmailId>> _emptyMailboxFolderOnWeb(
|
||||
@@ -141,7 +136,6 @@ class ThreadIsolateWorker {
|
||||
StreamController<dartz.Either<Failure, Success>> onProgressController
|
||||
) async {
|
||||
List<EmailId> emailListCompleted = List.empty(growable: true);
|
||||
try {
|
||||
var hasEmails = true;
|
||||
Email? lastEmail;
|
||||
|
||||
@@ -182,9 +176,6 @@ class ThreadIsolateWorker {
|
||||
hasEmails = false;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
log('ThreadIsolateWorker::_emptyMailboxFolderOnWeb(): ERROR: $e');
|
||||
}
|
||||
log('ThreadIsolateWorker::_emptyMailboxFolderOnWeb(): TOTAL_REMOVE: ${emailListCompleted.length}');
|
||||
return emailListCompleted;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user