mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 15:08:28 +03:00
Time limit improvements
This commit is contained in:
parent
d2c16381e2
commit
338f18d2af
3 changed files with 38 additions and 22 deletions
|
|
@ -26,6 +26,7 @@ import ContactStore from 'Stores/User/Contact';
|
|||
|
||||
import Local from 'Storage/Client';
|
||||
import Settings from 'Storage/Settings';
|
||||
import RainLoopStorage from 'Storage/RainLoop';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
import Promises from 'Promises/User/Ajax';
|
||||
|
|
@ -67,21 +68,25 @@ class AppUser extends AbstractApp
|
|||
window.setTimeout(() => window.setInterval(() => Events.pub('interval.10m-after5m'), 60000 * 10), 60000 * 5);
|
||||
|
||||
$.wakeUp(() => {
|
||||
if (RainLoopStorage.checkTimestamp())
|
||||
{
|
||||
this.reload();
|
||||
}
|
||||
|
||||
Remote.jsVersion((sResult, oData) => {
|
||||
if (Enums.StorageResultType.Success === sResult && oData && !oData.Result)
|
||||
{
|
||||
if (window.parent && !!Settings.appSettingsGet('inIframe'))
|
||||
{
|
||||
window.parent.location.reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.reload();
|
||||
}
|
||||
this.reload();
|
||||
}
|
||||
}, Settings.appSettingsGet('version'));
|
||||
|
||||
}, {}, 60 * 60 * 1000);
|
||||
|
||||
if (RainLoopStorage.checkTimestamp())
|
||||
{
|
||||
this.reload();
|
||||
}
|
||||
|
||||
if (Settings.settingsGet('UserBackgroundHash'))
|
||||
{
|
||||
_.delay(() => {
|
||||
|
|
@ -104,6 +109,17 @@ class AppUser extends AbstractApp
|
|||
return Remote;
|
||||
}
|
||||
|
||||
reload() {
|
||||
if (window.parent && !!Settings.appSettingsGet('inIframe'))
|
||||
{
|
||||
window.parent.location.reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
reloadFlagsCurrentMessageListAndMessageFromCache() {
|
||||
_.each(MessageStore.messageList(), (message) => {
|
||||
Cache.initMessageFlagsFromCache(message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue