mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Easier refresh Folders
This commit is contained in:
parent
11fd6736bb
commit
87bee226b4
4 changed files with 14 additions and 14 deletions
|
|
@ -157,25 +157,23 @@ export const FolderUserStore = new class {
|
|||
/**
|
||||
* @returns {Array}
|
||||
*/
|
||||
getNextFolderNames() {
|
||||
getNextFolderNames(ttl) {
|
||||
const result = [],
|
||||
limit = 10,
|
||||
utc = Date.now(),
|
||||
timeout = utc - 60000 * 5,
|
||||
timeout = utc - ttl,
|
||||
timeouts = [],
|
||||
inboxFolderName = getFolderInboxName(),
|
||||
bDisplaySpecSetting = this.displaySpecSetting(),
|
||||
fSearchFunction = (list) => {
|
||||
list.forEach(folder => {
|
||||
if (
|
||||
folder &&
|
||||
inboxFolderName !== folder.fullNameRaw &&
|
||||
folder.selectable &&
|
||||
folder.exists &&
|
||||
timeout > folder.interval &&
|
||||
timeout > folder.expires &&
|
||||
(folder.isSystemFolder() || (folder.subscribed() && (folder.checkable() || !bDisplaySpecSetting)))
|
||||
) {
|
||||
timeouts.push([folder.interval, folder.fullNameRaw]);
|
||||
timeouts.push([folder.expires, folder.fullNameRaw]);
|
||||
}
|
||||
|
||||
if (folder && folder.subFolders.length) {
|
||||
|
|
@ -191,7 +189,7 @@ export const FolderUserStore = new class {
|
|||
timeouts.find(aItem => {
|
||||
const folder = getFolderFromCacheList(aItem[1]);
|
||||
if (folder) {
|
||||
folder.interval = utc;
|
||||
folder.expires = utc;
|
||||
result.push(aItem[1]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue