Improved message cache handling and drop unused NEW_MESSAGE_CACHE

This commit is contained in:
the-djmaze 2022-06-07 11:54:19 +02:00
parent 757d71cd40
commit a60d027169
9 changed files with 83 additions and 161 deletions

View file

@ -1,5 +1,4 @@
import { i18n, getNotification } from 'Common/Translator';
import { setFolderHash } from 'Common/Cache';
import { MessageUserStore } from 'Stores/User/Message';
import { MessagelistUserStore } from 'Stores/User/Messagelist';
@ -45,8 +44,7 @@ export class FolderClearPopupView extends AbstractViewPopup {
folderToClear.totalEmails(0);
folderToClear.unreadEmails(0);
setFolderHash(folderToClear.fullName, '');
folderToClear.hash = '';
Remote.request('FolderClear', iError => {
this.clearingProcess(false);

View file

@ -3,7 +3,7 @@ import ko from 'ko';
import { Scope } from 'Common/Enums';
import { moveAction, addShortcut } from 'Common/Globals';
import { mailBox, settings } from 'Common/Links';
import { setFolderHash } from 'Common/Cache';
//import { setFolderHash } from 'Common/Cache';
import { addComputablesTo } from 'External/ko';
import { AppUserStore } from 'Stores/User/App';
@ -100,11 +100,11 @@ export class MailFolderList extends AbstractViewLeft {
if (!SettingsUserStore.usePreviewPane()) {
MessageUserStore.message(null);
}
/*
if (folder.fullName === FolderUserStore.currentFolderFullName()) {
setFolderHash(folder.fullName, '');
}
*/
hasher.setHash(
mailBox(folder.fullNameHash, 1,
(event.target.matches('.flag-icon') && !folder.isFlagged()) ? 'flagged' : ''