Adjust document.title Update indicator.

This commit is contained in:
NI
2019-10-01 15:46:18 +08:00
parent 5e32228960
commit 55a1574f46

View File

@@ -306,14 +306,15 @@ function startApp(rootEl) {
this.changeTitleInfo("(" + tabs.length + (updated ? "*" : "") + ")");
},
tabOpened(tabs) {
if (this.tabUpdateIndicator) {
clearTimeout(this.tabUpdateIndicator);
this.tabUpdateIndicator = null;
}
this.updateTabTitleInfo(tabs, false);
this.tabUpdated(tabs);
},
tabClosed(tabs) {
if (tabs.length > 0) {
this.updateTabTitleInfo(tabs, this.tabUpdateIndicator !== null);
return;
}
if (this.tabUpdateIndicator) {
clearTimeout(this.tabUpdateIndicator);
this.tabUpdateIndicator = null;
@@ -330,6 +331,7 @@ function startApp(rootEl) {
this.updateTabTitleInfo(tabs, true);
this.tabUpdateIndicator = setTimeout(() => {
this.tabUpdateIndicator = null;
this.updateTabTitleInfo(tabs, false);
}, updateIndicatorMaxDisplayTime);
}