* 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:
djmaze 2020-12-09 22:30:57 +01:00
parent b7f79db21c
commit 54f3337f01
3 changed files with 9 additions and 7 deletions

View file

@ -565,7 +565,7 @@ class AppUser extends AbstractApp {
const folderFromCache = getFolderFromCacheList(data.Result.Folder);
if (folderFromCache) {
folderFromCache.interval = Date.now() / 1000;
folderFromCache.interval = Date.now();
if (data.Result.Hash) {
setFolderHash(data.Result.Folder, data.Result.Hash);
@ -640,7 +640,7 @@ class AppUser extends AbstractApp {
Remote.folderInformationMultiply((sResult, oData) => {
if (StorageResultType.Success === sResult) {
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 => {
const hash = getFolderHash(item.Folder),
folder = getFolderFromCacheList(item.Folder);

View file

@ -152,9 +152,9 @@ class FolderUserStore {
*/
getNextFolderNames() {
const result = [],
limit = 5,
utc = Date.now() / 1000,
timeout = utc - 60 * 5,
limit = 10,
utc = Date.now(),
timeout = utc - 60000 * 5,
timeouts = [],
inboxFolderName = getFolderInboxName(),
fSearchFunction = (list) => {
@ -165,7 +165,9 @@ class FolderUserStore {
folder.selectable &&
folder.exists &&
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]);
}

View file

@ -683,7 +683,7 @@ class MessageUserStore {
folder = getFolderFromCacheList(collection.Folder);
if (folder && !cached) {
folder.interval = Date.now() / 1000;
folder.interval = Date.now();
setFolderHash(collection.Folder, collection.FolderHash);