mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
* don't divide folder.interval time, it has no purpose * up the limit to 10 folders per request folder.checkable() is still broken
This commit is contained in:
parent
b7f79db21c
commit
54f3337f01
3 changed files with 9 additions and 7 deletions
|
|
@ -565,7 +565,7 @@ class AppUser extends AbstractApp {
|
||||||
|
|
||||||
const folderFromCache = getFolderFromCacheList(data.Result.Folder);
|
const folderFromCache = getFolderFromCacheList(data.Result.Folder);
|
||||||
if (folderFromCache) {
|
if (folderFromCache) {
|
||||||
folderFromCache.interval = Date.now() / 1000;
|
folderFromCache.interval = Date.now();
|
||||||
|
|
||||||
if (data.Result.Hash) {
|
if (data.Result.Hash) {
|
||||||
setFolderHash(data.Result.Folder, data.Result.Hash);
|
setFolderHash(data.Result.Folder, data.Result.Hash);
|
||||||
|
|
@ -640,7 +640,7 @@ class AppUser extends AbstractApp {
|
||||||
Remote.folderInformationMultiply((sResult, oData) => {
|
Remote.folderInformationMultiply((sResult, oData) => {
|
||||||
if (StorageResultType.Success === sResult) {
|
if (StorageResultType.Success === sResult) {
|
||||||
if (oData && oData.Result && oData.Result.List && Array.isNotEmpty(oData.Result.List)) {
|
if (oData && oData.Result && oData.Result.List && Array.isNotEmpty(oData.Result.List)) {
|
||||||
const utc = Date.now() / 1000;
|
const utc = Date.now();
|
||||||
oData.Result.List.forEach(item => {
|
oData.Result.List.forEach(item => {
|
||||||
const hash = getFolderHash(item.Folder),
|
const hash = getFolderHash(item.Folder),
|
||||||
folder = getFolderFromCacheList(item.Folder);
|
folder = getFolderFromCacheList(item.Folder);
|
||||||
|
|
|
||||||
|
|
@ -152,9 +152,9 @@ class FolderUserStore {
|
||||||
*/
|
*/
|
||||||
getNextFolderNames() {
|
getNextFolderNames() {
|
||||||
const result = [],
|
const result = [],
|
||||||
limit = 5,
|
limit = 10,
|
||||||
utc = Date.now() / 1000,
|
utc = Date.now(),
|
||||||
timeout = utc - 60 * 5,
|
timeout = utc - 60000 * 5,
|
||||||
timeouts = [],
|
timeouts = [],
|
||||||
inboxFolderName = getFolderInboxName(),
|
inboxFolderName = getFolderInboxName(),
|
||||||
fSearchFunction = (list) => {
|
fSearchFunction = (list) => {
|
||||||
|
|
@ -165,7 +165,9 @@ class FolderUserStore {
|
||||||
folder.selectable &&
|
folder.selectable &&
|
||||||
folder.exists &&
|
folder.exists &&
|
||||||
timeout > folder.interval &&
|
timeout > folder.interval &&
|
||||||
(folder.isSystemFolder() || (folder.subscribed() && folder.checkable()))
|
// https://github.com/the-djmaze/snappymail/issues/47
|
||||||
|
// (folder.isSystemFolder() || (folder.subscribed() && folder.checkable()))
|
||||||
|
(folder.isSystemFolder() || folder.subscribed())
|
||||||
) {
|
) {
|
||||||
timeouts.push([folder.interval, folder.fullNameRaw]);
|
timeouts.push([folder.interval, folder.fullNameRaw]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -683,7 +683,7 @@ class MessageUserStore {
|
||||||
folder = getFolderFromCacheList(collection.Folder);
|
folder = getFolderFromCacheList(collection.Folder);
|
||||||
|
|
||||||
if (folder && !cached) {
|
if (folder && !cached) {
|
||||||
folder.interval = Date.now() / 1000;
|
folder.interval = Date.now();
|
||||||
|
|
||||||
setFolderHash(collection.Folder, collection.FolderHash);
|
setFolderHash(collection.Folder, collection.FolderHash);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue