fix: await IndexedDB cache clear on inbox deletion
This commit is contained in:
@@ -87,7 +87,7 @@ class CacheEnabledApiClient extends ApiClient {
|
||||
async clearDataInCache() {
|
||||
try {
|
||||
await this.dataManager.initDb();
|
||||
this.dataManager.db.clear(this.cacheModelName);
|
||||
await this.dataManager.db.clear(this.cacheModelName);
|
||||
} catch {
|
||||
// Ignore error
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ export const actions = {
|
||||
await InboxesAPI.delete(inboxId);
|
||||
commit(types.default.DELETE_INBOXES, inboxId);
|
||||
// Clear IndexedDB so stale inbox data isn't served on page refresh
|
||||
InboxesAPI.clearDataInCache();
|
||||
await InboxesAPI.clearDataInCache();
|
||||
commit(types.default.SET_INBOXES_UI_FLAG, { isDeleting: false });
|
||||
} catch (error) {
|
||||
commit(types.default.SET_INBOXES_UI_FLAG, { isDeleting: false });
|
||||
|
||||
Reference in New Issue
Block a user