Cleanup time handling

This commit is contained in:
djmaze 2021-07-19 14:26:32 +02:00
parent bb15cd1ec3
commit 1f2208d304
3 changed files with 11 additions and 8 deletions

View file

@ -81,6 +81,8 @@ import { ComposePopupView } from 'View/Popup/Compose';
import { FolderSystemPopupView } from 'View/Popup/FolderSystem';
import { AskPopupView } from 'View/Popup/Ask';
import { timeToNode } from 'Common/Momentor';
// Every 5 minutes
const refreshFolders = 300000;
@ -1020,7 +1022,14 @@ class AppUser extends AbstractApp {
this.hideLoading();
}
setInterval(() => dispatchEvent(new CustomEvent('reload-time')), 60000);
setInterval(this.reloadTime(), 60000);
}
reloadTime()
{
setTimeout(() =>
doc.querySelectorAll('[data-bind*="moment:"]').forEach(element => timeToNode(element))
, 1)
}
showMessageComposer(params = [])