mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Resolve #1678
This commit is contained in:
parent
7ff5232554
commit
6a1b83b365
7 changed files with 15 additions and 9 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import { RFC822 } from 'Common/File';
|
||||
import { getFolderInboxName, getFolderFromCacheList } from 'Common/Cache';
|
||||
import { baseCollator } from 'Common/Translator';
|
||||
import { isArray, arrayLength } from 'Common/Utils';
|
||||
import { SettingsGet } from 'Common/Globals';
|
||||
import { isArray, arrayLength, pInt } from 'Common/Utils';
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
import { FolderUserStore } from 'Stores/User/Folder';
|
||||
import { MessagelistUserStore } from 'Stores/User/Messagelist';
|
||||
|
|
@ -9,13 +10,13 @@ import { MessagelistUserStore } from 'Stores/User/Messagelist';
|
|||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
let refreshInterval,
|
||||
// Default every 5 minutes
|
||||
refreshFoldersInterval = 300000;
|
||||
// Default every 15 minutes
|
||||
refreshFoldersInterval = 900000;
|
||||
|
||||
export const
|
||||
|
||||
setRefreshFoldersInterval = minutes => {
|
||||
refreshFoldersInterval = Math.max(5, minutes) * 60000;
|
||||
refreshFoldersInterval = Math.max(1, pInt(SettingsGet('minRefreshInterval')), pInt(minutes)) * 60000;
|
||||
clearInterval(refreshInterval);
|
||||
refreshInterval = setInterval(() => {
|
||||
const cF = FolderUserStore.currentFolderFullName(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue