fixed state persisting and loading

This commit is contained in:
zadam
2019-08-16 21:52:36 +02:00
parent f259c60b54
commit d1d8e54d20
3 changed files with 9 additions and 7 deletions

View File

@@ -503,12 +503,12 @@ function clearOpenTabsTask() {
}
function openTabsChanged() {
// we don't want to send too many requests with tab changes so we always schedule task to do this in 3 seconds,
// we don't want to send too many requests with tab changes so we always schedule task to do this in 1 seconds,
// but if there's any change in between, we cancel the old one and schedule new one
// so effectively we kind of wait until user stopped e.g. quickly switching tabs
clearOpenTabsTask();
tabsChangedTaskId = setTimeout(saveOpenTabs, 3000);
tabsChangedTaskId = setTimeout(saveOpenTabs, 1000);
}
async function saveOpenTabs() {