fix(cnb): delete email and state cache when F5 or reload button
(cherry picked from commit 520cd6c82fbdd5da0316861a5620060bfdf3f3af)
This commit is contained in:
@@ -355,7 +355,7 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
if (action is RefreshChangeEmailAction) {
|
||||
_refreshEmailChanges(newState: action.newState);
|
||||
} else if (action is RefreshAllEmailAction) {
|
||||
refreshAllEmail(forceEmailQuery: forceEmailQuery);
|
||||
refreshAllEmail(forceEmailQuery: true);
|
||||
mailboxDashBoardController.clearEmailUIAction();
|
||||
}
|
||||
});
|
||||
@@ -607,7 +607,11 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
}
|
||||
}
|
||||
|
||||
void refreshAllEmail({bool forceEmailQuery = false}) {
|
||||
Future<void> refreshAllEmail({bool forceEmailQuery = false}) async {
|
||||
if (forceEmailQuery) {
|
||||
await cachingManager.clearAllEmailAndStateCache();
|
||||
}
|
||||
|
||||
if (searchController.isSearchEmailRunning) {
|
||||
consumeState(Stream.value(Right(SearchingState())));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user