Fix cannot auto refresh when back to app

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-06-18 17:01:59 +07:00
committed by Dat H. Pham
parent 15c8ce2111
commit ca1ba459a1
4 changed files with 10 additions and 10 deletions
@@ -288,16 +288,16 @@ class SearchEmailController extends BaseController
});
}
void _refreshEmailChanges({jmap.State? newState}) {
void _refreshEmailChanges({required jmap.State newState}) {
log('SearchEmailController::_refreshEmailChanges(): newState: $newState');
if (accountId == null ||
session == null ||
mailboxDashBoardController.currentEmailState == null ||
newState == null ||
mailboxDashBoardController.currentEmailState == newState ||
searchIsRunning.isFalse) {
return;
}
log('SearchEmailController::_refreshEmailChanges: websocket enqueue message');
_webSocketQueueHandler?.enqueue(WebSocketMessage(newState: newState));
}
@@ -221,7 +221,7 @@ class SearchMailboxController extends BaseMailboxController with MailboxActionHa
}
}
void _refreshMailboxChanges({jmap.State? newState}) {
void _refreshMailboxChanges({required jmap.State newState}) {
if (accountId == null ||
session == null ||
currentMailboxState == null ||