mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Improved message cache handling and drop unused NEW_MESSAGE_CACHE
This commit is contained in:
parent
757d71cd40
commit
a60d027169
9 changed files with 83 additions and 161 deletions
|
|
@ -1,8 +1,6 @@
|
|||
import { pString, pInt, b64EncodeJSONSafe } from 'Common/Utils';
|
||||
|
||||
import {
|
||||
getFolderHash,
|
||||
getFolderUidNext,
|
||||
getFolderFromCacheList
|
||||
} from 'Common/Cache';
|
||||
|
||||
|
|
@ -25,13 +23,14 @@ class RemoteUserFetch extends AbstractFetchRemote {
|
|||
messageList(fCallback, params, bSilent = false) {
|
||||
const
|
||||
sFolderFullName = pString(params.Folder),
|
||||
folderHash = getFolderHash(sFolderFullName);
|
||||
folder = getFolderFromCacheList(sFolderFullName),
|
||||
folderHash = (folder && folder.hash) || '';
|
||||
|
||||
params = Object.assign({
|
||||
Offset: 0,
|
||||
Limit: SettingsUserStore.messagesPerPage(),
|
||||
Search: '',
|
||||
UidNext: getFolderUidNext(sFolderFullName), // Used to check for new messages
|
||||
UidNext: (folder && folder.uidNext) || 0, // Used to check for new messages
|
||||
Sort: FolderUserStore.sortMode(),
|
||||
Hash: folderHash + SettingsGet('AccountHash')
|
||||
}, params);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue