mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Proper fix for default sortMode
This commit is contained in:
parent
6bdd509b48
commit
3a589e240c
3 changed files with 5 additions and 3 deletions
|
|
@ -7,7 +7,6 @@ import { forEachObjectEntry } from 'Common/Utils';
|
||||||
import { getFolderInboxName, getFolderFromCacheList } from 'Common/Cache';
|
import { getFolderInboxName, getFolderFromCacheList } from 'Common/Cache';
|
||||||
import { Settings, SettingsCapa } from 'Common/Globals';
|
import { Settings, SettingsCapa } from 'Common/Globals';
|
||||||
//import Remote from 'Remote/User/Fetch'; // Circular dependency
|
//import Remote from 'Remote/User/Fetch'; // Circular dependency
|
||||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
|
||||||
|
|
||||||
export const
|
export const
|
||||||
|
|
||||||
|
|
@ -60,7 +59,7 @@ FolderUserStore = new class {
|
||||||
*/
|
*/
|
||||||
displaySpecSetting: false,
|
displaySpecSetting: false,
|
||||||
|
|
||||||
sortMode: SettingsUserStore.defaultSort(),
|
sortMode: '',
|
||||||
|
|
||||||
quotaLimit: 0,
|
quotaLimit: 0,
|
||||||
quotaUsage: 0,
|
quotaUsage: 0,
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import { LayoutSideView, LayoutBottomView } from 'Common/EnumsUser';
|
||||||
import { pInt } from 'Common/Utils';
|
import { pInt } from 'Common/Utils';
|
||||||
import { $htmlCL, SettingsGet, fireEvent } from 'Common/Globals';
|
import { $htmlCL, SettingsGet, fireEvent } from 'Common/Globals';
|
||||||
import { ThemeStore } from 'Stores/Theme';
|
import { ThemeStore } from 'Stores/Theme';
|
||||||
|
import { FolderUserStore } from 'Stores/User/Folder';
|
||||||
|
|
||||||
export const SettingsUserStore = new class {
|
export const SettingsUserStore = new class {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
@ -163,5 +164,7 @@ export const SettingsUserStore = new class {
|
||||||
self.messageReadDelay(pInt(SettingsGet('MessageReadDelay')));
|
self.messageReadDelay(pInt(SettingsGet('MessageReadDelay')));
|
||||||
self.autoLogout(pInt(SettingsGet('AutoLogout')));
|
self.autoLogout(pInt(SettingsGet('AutoLogout')));
|
||||||
self.keyPassForget(pInt(SettingsGet('keyPassForget')));
|
self.keyPassForget(pInt(SettingsGet('keyPassForget')));
|
||||||
|
|
||||||
|
FolderUserStore.sortMode(self.defaultSort());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ export class MailMessageList extends AbstractViewRight {
|
||||||
},
|
},
|
||||||
|
|
||||||
sortText: () => {
|
sortText: () => {
|
||||||
let mode = FolderUserStore.sortMode() || '',
|
let mode = FolderUserStore.sortMode(),
|
||||||
has = w => mode.includes(w),
|
has = w => mode.includes(w),
|
||||||
desc = '' === mode || has('REVERSE');
|
desc = '' === mode || has('REVERSE');
|
||||||
mode = mode.split(/\s+/);
|
mode = mode.split(/\s+/);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue