mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Convert user stores to single object instances
Removed unused ContactUserStore.exportingCsv and ContactUserStore.exportingVcf
This commit is contained in:
parent
914c6e8d14
commit
6a454ec624
46 changed files with 671 additions and 710 deletions
|
|
@ -32,11 +32,11 @@ import {
|
|||
addRequestedMessage
|
||||
} from 'Common/Cache';
|
||||
|
||||
import AppStore from 'Stores/User/App';
|
||||
import QuotaStore from 'Stores/User/Quota';
|
||||
import SettingsStore from 'Stores/User/Settings';
|
||||
import FolderStore from 'Stores/User/Folder';
|
||||
import MessageStore from 'Stores/User/Message';
|
||||
import { AppUserStore } from 'Stores/User/App';
|
||||
import { QuotaUserStore } from 'Stores/User/Quota';
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
import { FolderUserStore } from 'Stores/User/Folder';
|
||||
import { MessageUserStore } from 'Stores/User/Message';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
|
@ -48,7 +48,7 @@ import { FolderClearPopupView } from 'View/Popup/FolderClear';
|
|||
import { AdvancedSearchPopupView } from 'View/Popup/AdvancedSearch';
|
||||
|
||||
const
|
||||
canBeMovedHelper = () => MessageStore.hasCheckedOrSelected();
|
||||
canBeMovedHelper = () => MessageUserStore.hasCheckedOrSelected();
|
||||
|
||||
export class MessageListMailBoxUserView extends AbstractViewRight {
|
||||
constructor() {
|
||||
|
|
@ -71,39 +71,40 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
this.popupVisibility = popupVisibility;
|
||||
|
||||
this.message = MessageStore.message;
|
||||
this.messageList = MessageStore.messageList;
|
||||
this.messageListDisableAutoSelect = MessageStore.messageListDisableAutoSelect;
|
||||
this.message = MessageUserStore.message;
|
||||
this.messageList = MessageUserStore.messageList;
|
||||
this.messageListDisableAutoSelect = MessageUserStore.messageListDisableAutoSelect;
|
||||
|
||||
this.folderList = FolderStore.folderList;
|
||||
this.folderList = FolderUserStore.folderList;
|
||||
|
||||
this.composeInEdit = AppStore.composeInEdit;
|
||||
this.composeInEdit = AppUserStore.composeInEdit;
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
|
||||
this.selectorMessageSelected = MessageStore.selectorMessageSelected;
|
||||
this.selectorMessageFocused = MessageStore.selectorMessageFocused;
|
||||
this.isMessageSelected = MessageStore.isMessageSelected;
|
||||
this.messageListSearch = MessageStore.messageListSearch;
|
||||
this.messageListThreadUid = MessageStore.messageListThreadUid;
|
||||
this.messageListError = MessageStore.messageListError;
|
||||
this.folderMenuForMove = FolderStore.folderMenuForMove;
|
||||
this.selectorMessageSelected = MessageUserStore.selectorMessageSelected;
|
||||
this.selectorMessageFocused = MessageUserStore.selectorMessageFocused;
|
||||
this.isMessageSelected = MessageUserStore.isMessageSelected;
|
||||
this.messageListSearch = MessageUserStore.messageListSearch;
|
||||
this.messageListThreadUid = MessageUserStore.messageListThreadUid;
|
||||
this.messageListError = MessageUserStore.messageListError;
|
||||
this.folderMenuForMove = FolderUserStore.folderMenuForMove;
|
||||
|
||||
this.useCheckboxesInList = SettingsStore.useCheckboxesInList;
|
||||
this.useCheckboxesInList = SettingsUserStore.useCheckboxesInList;
|
||||
|
||||
this.mainMessageListSearch = MessageStore.mainMessageListSearch;
|
||||
this.messageListEndFolder = MessageStore.messageListEndFolder;
|
||||
this.messageListEndThreadUid = MessageStore.messageListEndThreadUid;
|
||||
this.mainMessageListSearch = MessageUserStore.mainMessageListSearch;
|
||||
this.messageListEndFolder = MessageUserStore.messageListEndFolder;
|
||||
this.messageListEndThreadUid = MessageUserStore.messageListEndThreadUid;
|
||||
|
||||
this.messageListCheckedOrSelected = MessageStore.messageListCheckedOrSelected;
|
||||
this.messageListCheckedOrSelectedUidsWithSubMails = MessageStore.messageListCheckedOrSelectedUidsWithSubMails;
|
||||
this.messageListCompleteLoadingThrottle = MessageStore.messageListCompleteLoadingThrottle;
|
||||
this.messageListCompleteLoadingThrottleForAnimation = MessageStore.messageListCompleteLoadingThrottleForAnimation;
|
||||
this.messageListCheckedOrSelected = MessageUserStore.messageListCheckedOrSelected;
|
||||
this.messageListCheckedOrSelectedUidsWithSubMails = MessageUserStore.messageListCheckedOrSelectedUidsWithSubMails;
|
||||
this.messageListCompleteLoadingThrottle = MessageUserStore.messageListCompleteLoadingThrottle;
|
||||
this.messageListCompleteLoadingThrottleForAnimation =
|
||||
MessageUserStore.messageListCompleteLoadingThrottleForAnimation;
|
||||
|
||||
initOnStartOrLangChange(() => this.emptySubjectValue = i18n('MESSAGE_LIST/EMPTY_SUBJECT_TEXT'));
|
||||
|
||||
this.userQuota = QuotaStore.quota;
|
||||
this.userUsageSize = QuotaStore.usage;
|
||||
this.userUsageProc = QuotaStore.percentage;
|
||||
this.userQuota = QuotaUserStore.quota;
|
||||
this.userUsageSize = QuotaUserStore.usage;
|
||||
this.userUsageProc = QuotaUserStore.percentage;
|
||||
|
||||
this.addObservables({
|
||||
moveDropdownTrigger: false,
|
||||
|
|
@ -123,17 +124,18 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
this.addComputables({
|
||||
messageListSearchDesc: () => {
|
||||
const value = MessageStore.messageListEndSearch();
|
||||
const value = MessageUserStore.messageListEndSearch();
|
||||
return value ? i18n('MESSAGE_LIST/SEARCH_RESULT_FOR', { 'SEARCH': value }) : ''
|
||||
},
|
||||
|
||||
messageListPaginator: computedPaginatorHelper(MessageStore.messageListPage, MessageStore.messageListPageCount),
|
||||
messageListPaginator: computedPaginatorHelper(MessageUserStore.messageListPage,
|
||||
MessageUserStore.messageListPageCount),
|
||||
|
||||
checkAll: {
|
||||
read: () => 0 < MessageStore.messageListChecked().length,
|
||||
read: () => 0 < MessageUserStore.messageListChecked().length,
|
||||
write: (value) => {
|
||||
value = !!value;
|
||||
MessageStore.messageList.forEach(message => message.checked(value));
|
||||
MessageUserStore.messageList.forEach(message => message.checked(value));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -143,25 +145,25 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
},
|
||||
|
||||
isIncompleteChecked: () => {
|
||||
const c = MessageStore.messageListChecked().length;
|
||||
return c && MessageStore.messageList.length > c;
|
||||
const c = MessageUserStore.messageListChecked().length;
|
||||
return c && MessageUserStore.messageList.length > c;
|
||||
},
|
||||
|
||||
hasMessages: () => 0 < this.messageList.length,
|
||||
|
||||
isSpamFolder: () => FolderStore.spamFolder() === this.messageListEndFolder() && FolderStore.spamFolder(),
|
||||
isSpamFolder: () => (FolderUserStore.spamFolder() || 0) === this.messageListEndFolder(),
|
||||
|
||||
isSpamDisabled: () => UNUSED_OPTION_VALUE === FolderStore.spamFolder(),
|
||||
isSpamDisabled: () => UNUSED_OPTION_VALUE === FolderUserStore.spamFolder(),
|
||||
|
||||
isTrashFolder: () => FolderStore.trashFolder() === this.messageListEndFolder() && FolderStore.trashFolder(),
|
||||
isTrashFolder: () => (FolderUserStore.trashFolder() || 0) === this.messageListEndFolder(),
|
||||
|
||||
isDraftFolder: () => FolderStore.draftFolder() === this.messageListEndFolder() && FolderStore.draftFolder(),
|
||||
isDraftFolder: () => (FolderUserStore.draftFolder() || 0) === this.messageListEndFolder(),
|
||||
|
||||
isSentFolder: () => FolderStore.sentFolder() === this.messageListEndFolder() && FolderStore.sentFolder(),
|
||||
isSentFolder: () => (FolderUserStore.sentFolder() || 0) === this.messageListEndFolder(),
|
||||
|
||||
isArchiveFolder: () => FolderStore.archiveFolder() === this.messageListEndFolder() && FolderStore.archiveFolder(),
|
||||
isArchiveFolder: () => (FolderUserStore.archiveFolder() || 0) === this.messageListEndFolder(),
|
||||
|
||||
isArchiveDisabled: () => UNUSED_OPTION_VALUE === FolderStore.archiveFolder(),
|
||||
isArchiveDisabled: () => UNUSED_OPTION_VALUE === FolderUserStore.archiveFolder(),
|
||||
|
||||
isArchiveVisible: () => !this.isArchiveFolder() && !this.isArchiveDisabled() && !this.isDraftFolder(),
|
||||
|
||||
|
|
@ -171,16 +173,16 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
isUnSpamVisible: () =>
|
||||
this.isSpamFolder() && !this.isSpamDisabled() && !this.isDraftFolder() && !this.isSentFolder(),
|
||||
|
||||
mobileCheckedStateShow: () => ThemeStore.isMobile() ? 0 < MessageStore.messageListChecked().length : true,
|
||||
mobileCheckedStateShow: () => ThemeStore.isMobile() ? 0 < MessageUserStore.messageListChecked().length : true,
|
||||
|
||||
mobileCheckedStateHide: () => ThemeStore.isMobile() ? !MessageStore.messageListChecked().length : true,
|
||||
mobileCheckedStateHide: () => ThemeStore.isMobile() ? !MessageUserStore.messageListChecked().length : true,
|
||||
|
||||
messageListFocused: () => Focused.MessageList === AppStore.focusedState()
|
||||
messageListFocused: () => Focused.MessageList === AppUserStore.focusedState()
|
||||
});
|
||||
|
||||
// this.messageListChecked = MessageStore.messageListChecked;
|
||||
// this.messageListChecked = MessageUserStore.messageListChecked;
|
||||
|
||||
this.hasCheckedOrSelectedLines = MessageStore.hasCheckedOrSelected,
|
||||
this.hasCheckedOrSelectedLines = MessageUserStore.hasCheckedOrSelected,
|
||||
|
||||
this.quotaTooltip = this.quotaTooltip.bind(this);
|
||||
|
||||
|
|
@ -194,7 +196,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
'.messageListItem.focused'
|
||||
);
|
||||
|
||||
this.selector.on('onItemSelect', message => MessageStore.selectMessage(message));
|
||||
this.selector.on('onItemSelect', message => MessageUserStore.selectMessage(message));
|
||||
|
||||
this.selector.on('onItemGetUid', message => (message ? message.generateUid() : ''));
|
||||
|
||||
|
|
@ -228,11 +230,11 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
rl.route.setHash(mailBox(sFolder, 1));
|
||||
}
|
||||
|
||||
MessageStore.selectMessageByFolderAndUid(sFolder, sUid);
|
||||
MessageUserStore.selectMessageByFolderAndUid(sFolder, sUid);
|
||||
}
|
||||
});
|
||||
|
||||
MessageStore.messageListEndHash.subscribe((() =>
|
||||
MessageUserStore.messageListEndHash.subscribe((() =>
|
||||
this.selector.scrollToFocused()
|
||||
).throttle(50));
|
||||
|
||||
|
|
@ -252,12 +254,12 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
clearCommand() {
|
||||
if (Settings.capa(Capa.DangerousActions)) {
|
||||
showScreenPopup(FolderClearPopupView, [FolderStore.currentFolder()]);
|
||||
showScreenPopup(FolderClearPopupView, [FolderUserStore.currentFolder()]);
|
||||
}
|
||||
}
|
||||
|
||||
reloadCommand() {
|
||||
if (!MessageStore.messageListCompleteLoadingThrottleForAnimation() && this.allowReload) {
|
||||
if (!MessageUserStore.messageListCompleteLoadingThrottleForAnimation() && this.allowReload) {
|
||||
rl.app.reloadMessageList(false, true);
|
||||
}
|
||||
}
|
||||
|
|
@ -265,7 +267,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
multyForwardCommand() {
|
||||
showMessageComposer([
|
||||
ComposeType.ForwardAsAttachment,
|
||||
MessageStore.messageListCheckedOrSelected()
|
||||
MessageUserStore.messageListCheckedOrSelected()
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -273,8 +275,8 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
if (Settings.capa(Capa.DangerousActions)) {
|
||||
rl.app.deleteMessagesFromFolder(
|
||||
FolderType.Trash,
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
MessageStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageUserStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
false
|
||||
);
|
||||
}
|
||||
|
|
@ -283,8 +285,8 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
deleteCommand() {
|
||||
rl.app.deleteMessagesFromFolder(
|
||||
FolderType.Trash,
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
MessageStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageUserStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
|
@ -292,8 +294,8 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
archiveCommand() {
|
||||
rl.app.deleteMessagesFromFolder(
|
||||
FolderType.Archive,
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
MessageStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageUserStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
|
@ -301,8 +303,8 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
spamCommand() {
|
||||
rl.app.deleteMessagesFromFolder(
|
||||
FolderType.Spam,
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
MessageStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageUserStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
|
@ -310,8 +312,8 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
notSpamCommand() {
|
||||
rl.app.deleteMessagesFromFolder(
|
||||
FolderType.NotSpam,
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
MessageStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageUserStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
|
@ -326,7 +328,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
}
|
||||
|
||||
let b = moveAction();
|
||||
AppStore.focusedState(b ? Focused.MessageList : Focused.FolderList);
|
||||
AppUserStore.focusedState(b ? Focused.MessageList : Focused.FolderList);
|
||||
moveAction(!b);
|
||||
}
|
||||
}
|
||||
|
|
@ -350,7 +352,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
}
|
||||
|
||||
goToUpUpOrDownDown(up) {
|
||||
if (MessageStore.messageListChecked().length) {
|
||||
if (MessageUserStore.messageListChecked().length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -379,7 +381,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
return false;
|
||||
});
|
||||
|
||||
if (!SettingsStore.usePreviewPane() && !this.message()) {
|
||||
if (!SettingsUserStore.usePreviewPane() && !this.message()) {
|
||||
this.selector.iFocusedNextHelper = up ? -1 : 1;
|
||||
} else {
|
||||
this.selector.iSelectNextHelper = up ? -1 : 1;
|
||||
|
|
@ -397,7 +399,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
useAutoSelect() {
|
||||
return !this.messageListDisableAutoSelect()
|
||||
&& !/is:unseen/.test(this.mainMessageListSearch())
|
||||
&& SettingsStore.usePreviewPane();
|
||||
&& SettingsUserStore.usePreviewPane();
|
||||
}
|
||||
|
||||
searchEnterAction() {
|
||||
|
|
@ -413,9 +415,9 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
cancelThreadUid() {
|
||||
rl.route.setHash(
|
||||
mailBox(
|
||||
FolderStore.currentFolderFullNameHash(),
|
||||
MessageStore.messageListPageBeforeThread(),
|
||||
MessageStore.messageListSearch()
|
||||
FolderUserStore.currentFolderFullNameHash(),
|
||||
MessageUserStore.messageListPageBeforeThread(),
|
||||
MessageUserStore.messageListSearch()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
@ -426,10 +428,10 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
moveSelectedMessagesToFolder(sToFolderFullNameRaw, bCopy) {
|
||||
if (MessageStore.hasCheckedOrSelected()) {
|
||||
if (MessageUserStore.hasCheckedOrSelected()) {
|
||||
rl.app.moveMessagesToFolder(
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
MessageStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageUserStore.messageListCheckedOrSelectedUidsWithSubMails(),
|
||||
sToFolderFullNameRaw,
|
||||
bCopy
|
||||
);
|
||||
|
|
@ -441,11 +443,11 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
getDragData(event) {
|
||||
const item = ko.dataFor(doc.elementFromPoint(event.clientX, event.clientY));
|
||||
item && item.checked && item.checked(true);
|
||||
const uids = MessageStore.messageListCheckedOrSelectedUidsWithSubMails();
|
||||
const uids = MessageUserStore.messageListCheckedOrSelectedUidsWithSubMails();
|
||||
item && !uids.includes(item.uid) && uids.push(item.uid);
|
||||
return uids.length ? {
|
||||
copy: event.ctrlKey,
|
||||
folder: FolderStore.currentFolderFullNameRaw(),
|
||||
folder: FolderUserStore.currentFolderFullNameRaw(),
|
||||
uids: uids
|
||||
} : null;
|
||||
}
|
||||
|
|
@ -477,7 +479,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
case MessageSetAction.SetSeen:
|
||||
folder = getFolderFromCacheList(sFolderFullNameRaw);
|
||||
if (folder) {
|
||||
MessageStore.messageList.forEach(message => {
|
||||
MessageUserStore.messageList.forEach(message => {
|
||||
if (message.isUnseen()) {
|
||||
++cnt;
|
||||
}
|
||||
|
|
@ -503,7 +505,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
case MessageSetAction.UnsetSeen:
|
||||
folder = getFolderFromCacheList(sFolderFullNameRaw);
|
||||
if (folder) {
|
||||
MessageStore.messageList.forEach(message => {
|
||||
MessageUserStore.messageList.forEach(message => {
|
||||
if (!message.isUnseen()) {
|
||||
++cnt;
|
||||
}
|
||||
|
|
@ -536,15 +538,15 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
listSetSeen() {
|
||||
this.setAction(
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageSetAction.SetSeen,
|
||||
MessageStore.messageListCheckedOrSelected()
|
||||
MessageUserStore.messageListCheckedOrSelected()
|
||||
);
|
||||
}
|
||||
|
||||
listSetAllSeen() {
|
||||
this.setActionForAll(
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageSetAction.SetSeen,
|
||||
this.messageListEndThreadUid()
|
||||
);
|
||||
|
|
@ -552,25 +554,25 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
listUnsetSeen() {
|
||||
this.setAction(
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageSetAction.UnsetSeen,
|
||||
MessageStore.messageListCheckedOrSelected()
|
||||
MessageUserStore.messageListCheckedOrSelected()
|
||||
);
|
||||
}
|
||||
|
||||
listSetFlags() {
|
||||
this.setAction(
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageSetAction.SetFlag,
|
||||
MessageStore.messageListCheckedOrSelected()
|
||||
MessageUserStore.messageListCheckedOrSelected()
|
||||
);
|
||||
}
|
||||
|
||||
listUnsetFlags() {
|
||||
this.setAction(
|
||||
FolderStore.currentFolderFullNameRaw(),
|
||||
FolderUserStore.currentFolderFullNameRaw(),
|
||||
MessageSetAction.UnsetFlag,
|
||||
MessageStore.messageListCheckedOrSelected()
|
||||
MessageUserStore.messageListCheckedOrSelected()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -637,20 +639,20 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
gotoPage(page) {
|
||||
page && rl.route.setHash(
|
||||
mailBox(
|
||||
FolderStore.currentFolderFullNameHash(),
|
||||
FolderUserStore.currentFolderFullNameHash(),
|
||||
page.value,
|
||||
MessageStore.messageListSearch(),
|
||||
MessageStore.messageListThreadUid()
|
||||
MessageUserStore.messageListSearch(),
|
||||
MessageUserStore.messageListThreadUid()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
gotoThread(message) {
|
||||
if (message && 0 < message.threadsLen()) {
|
||||
MessageStore.messageListPageBeforeThread(MessageStore.messageListPage());
|
||||
MessageUserStore.messageListPageBeforeThread(MessageUserStore.messageListPage());
|
||||
|
||||
rl.route.setHash(
|
||||
mailBox(FolderStore.currentFolderFullNameHash(), 1, MessageStore.messageListSearch(), message.uid)
|
||||
mailBox(FolderUserStore.currentFolderFullNameHash(), 1, MessageUserStore.messageListSearch(), message.uid)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -673,8 +675,8 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
dom.addEventListener('click', event => {
|
||||
ThemeStore.isMobile() && leftPanelDisabled(true);
|
||||
|
||||
if (eqs(event, '.messageList .b-message-list-wrapper') && Focused.MessageView === AppStore.focusedState()) {
|
||||
AppStore.focusedState(Focused.MessageList);
|
||||
if (eqs(event, '.messageList .b-message-list-wrapper') && Focused.MessageView === AppUserStore.focusedState()) {
|
||||
AppUserStore.focusedState(Focused.MessageList);
|
||||
}
|
||||
|
||||
let el = eqs(event, '.e-paginator .e-page');
|
||||
|
|
@ -721,12 +723,12 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
// delete
|
||||
shortcuts.add('delete', 'shift', KeyState.MessageList, () => {
|
||||
MessageStore.messageListCheckedOrSelected().length && this.deleteWithoutMoveCommand();
|
||||
MessageUserStore.messageListCheckedOrSelected().length && this.deleteWithoutMoveCommand();
|
||||
return false;
|
||||
});
|
||||
// shortcuts.add('3', 'shift', KeyState.MessageList, () => {
|
||||
shortcuts.add('delete', '', KeyState.MessageList, () => {
|
||||
MessageStore.messageListCheckedOrSelected().length && this.deleteCommand();
|
||||
MessageUserStore.messageListCheckedOrSelected().length && this.deleteCommand();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
|
@ -827,15 +829,15 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
|
||||
// change focused state
|
||||
shortcuts.add('tab', 'shift', KeyState.MessageList, () => {
|
||||
AppStore.focusedState(Focused.FolderList);
|
||||
AppUserStore.focusedState(Focused.FolderList);
|
||||
return false;
|
||||
});
|
||||
shortcuts.add('arrowleft', '', KeyState.MessageList, () => {
|
||||
AppStore.focusedState(Focused.FolderList);
|
||||
AppUserStore.focusedState(Focused.FolderList);
|
||||
return false;
|
||||
});
|
||||
shortcuts.add('tab,arrowright', '', KeyState.MessageList, () => {
|
||||
this.message() && AppStore.focusedState(Focused.MessageView);
|
||||
this.message() && AppUserStore.focusedState(Focused.MessageView);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
@ -892,7 +894,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
queueSize: 1,
|
||||
multipleSizeLimit: 1,
|
||||
hidden: {
|
||||
Folder: () => FolderStore.currentFolderFullNameRaw()
|
||||
Folder: () => FolderUserStore.currentFolderFullNameRaw()
|
||||
},
|
||||
dragAndDropElement: this.dragOverArea(),
|
||||
dragAndDropBodyElement: this.dragOverBodyArea()
|
||||
|
|
@ -907,7 +909,7 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
.on('onBodyDragLeave', () => this.dragOver(false))
|
||||
.on('onSelect', (sUid, oData) => {
|
||||
if (sUid && oData && 'message/rfc822' === oData.Type) {
|
||||
MessageStore.messageListLoading(true);
|
||||
MessageUserStore.messageListLoading(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue