mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-15 01:24:23 +08: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 { Settings, SettingsCapa } from 'Common/Globals';
|
||||
//import Remote from 'Remote/User/Fetch'; // Circular dependency
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
|
||||
export const
|
||||
|
||||
|
@ -60,7 +59,7 @@ FolderUserStore = new class {
|
|||
*/
|
||||
displaySpecSetting: false,
|
||||
|
||||
sortMode: SettingsUserStore.defaultSort(),
|
||||
sortMode: '',
|
||||
|
||||
quotaLimit: 0,
|
||||
quotaUsage: 0,
|
||||
|
|
|
@ -5,6 +5,7 @@ import { LayoutSideView, LayoutBottomView } from 'Common/EnumsUser';
|
|||
import { pInt } from 'Common/Utils';
|
||||
import { $htmlCL, SettingsGet, fireEvent } from 'Common/Globals';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
import { FolderUserStore } from 'Stores/User/Folder';
|
||||
|
||||
export const SettingsUserStore = new class {
|
||||
constructor() {
|
||||
|
@ -163,5 +164,7 @@ export const SettingsUserStore = new class {
|
|||
self.messageReadDelay(pInt(SettingsGet('MessageReadDelay')));
|
||||
self.autoLogout(pInt(SettingsGet('AutoLogout')));
|
||||
self.keyPassForget(pInt(SettingsGet('keyPassForget')));
|
||||
|
||||
FolderUserStore.sortMode(self.defaultSort());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -212,7 +212,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
},
|
||||
|
||||
sortText: () => {
|
||||
let mode = FolderUserStore.sortMode() || '',
|
||||
let mode = FolderUserStore.sortMode(),
|
||||
has = w => mode.includes(w),
|
||||
desc = '' === mode || has('REVERSE');
|
||||
mode = mode.split(/\s+/);
|
||||
|
|
Loading…
Add table
Reference in a new issue