Adjust document.title Update indicator.
This commit is contained in:
14
ui/app.js
14
ui/app.js
@@ -306,14 +306,15 @@ function startApp(rootEl) {
|
|||||||
this.changeTitleInfo("(" + tabs.length + (updated ? "*" : "") + ")");
|
this.changeTitleInfo("(" + tabs.length + (updated ? "*" : "") + ")");
|
||||||
},
|
},
|
||||||
tabOpened(tabs) {
|
tabOpened(tabs) {
|
||||||
if (this.tabUpdateIndicator) {
|
this.tabUpdated(tabs);
|
||||||
clearTimeout(this.tabUpdateIndicator);
|
|
||||||
this.tabUpdateIndicator = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.updateTabTitleInfo(tabs, false);
|
|
||||||
},
|
},
|
||||||
tabClosed(tabs) {
|
tabClosed(tabs) {
|
||||||
|
if (tabs.length > 0) {
|
||||||
|
this.updateTabTitleInfo(tabs, this.tabUpdateIndicator !== null);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.tabUpdateIndicator) {
|
if (this.tabUpdateIndicator) {
|
||||||
clearTimeout(this.tabUpdateIndicator);
|
clearTimeout(this.tabUpdateIndicator);
|
||||||
this.tabUpdateIndicator = null;
|
this.tabUpdateIndicator = null;
|
||||||
@@ -330,6 +331,7 @@ function startApp(rootEl) {
|
|||||||
this.updateTabTitleInfo(tabs, true);
|
this.updateTabTitleInfo(tabs, true);
|
||||||
|
|
||||||
this.tabUpdateIndicator = setTimeout(() => {
|
this.tabUpdateIndicator = setTimeout(() => {
|
||||||
|
this.tabUpdateIndicator = null;
|
||||||
this.updateTabTitleInfo(tabs, false);
|
this.updateTabTitleInfo(tabs, false);
|
||||||
}, updateIndicatorMaxDisplayTime);
|
}, updateIndicatorMaxDisplayTime);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user