Restructure JavaScript

Split list code from MessageUserStore into MessagelistUserStore
Move functions out of AppUser
This commit is contained in:
the-djmaze 2022-02-23 19:26:52 +01:00
parent 60b7f61e42
commit 661cd2aaf9
26 changed files with 1144 additions and 1186 deletions

View file

@ -2,6 +2,7 @@ import { i18n, getNotification } from 'Common/Translator';
import { setFolderHash } from 'Common/Cache';
import { MessageUserStore } from 'Stores/User/Message';
import { MessagelistUserStore } from 'Stores/User/Messagelist';
import Remote from 'Remote/User/Fetch';
@ -38,7 +39,7 @@ class FolderClearPopupView extends AbstractViewPopup {
const folderToClear = this.selectedFolder();
if (folderToClear) {
MessageUserStore.message(null);
MessageUserStore.list([]);
MessagelistUserStore([]);
this.clearingProcess(true);
@ -52,7 +53,7 @@ class FolderClearPopupView extends AbstractViewPopup {
if (iError) {
this.clearingError(getNotification(iError));
} else {
rl.app.reloadMessageList(true);
MessagelistUserStore.reload(true);
this.cancelCommand();
}
}, {