This commit is contained in:
Oksana Melnik 2019-10-25 08:08:04 +02:00
parent 384ac486d9
commit c3da573722
2 changed files with 19 additions and 19 deletions

View file

@ -113,12 +113,12 @@ const backgroundLogic = {
return list.concat(containerState.hiddenTabs); return list.concat(containerState.hiddenTabs);
}, },
async unhideContainer(cookieStoreId, toHide) { async unhideContainer(cookieStoreId, alreadyShowingUrl) {
if (!this.unhideQueue.includes(cookieStoreId)) { if (!this.unhideQueue.includes(cookieStoreId)) {
this.unhideQueue.push(cookieStoreId); this.unhideQueue.push(cookieStoreId);
await this.showTabs({ await this.showTabs({
cookieStoreId, cookieStoreId,
toHide alreadyShowingUrl
}); });
this.unhideQueue.splice(this.unhideQueue.indexOf(cookieStoreId), 1); this.unhideQueue.splice(this.unhideQueue.indexOf(cookieStoreId), 1);
} }
@ -311,7 +311,7 @@ const backgroundLogic = {
for (let object of containerState.hiddenTabs) { // eslint-disable-line prefer-const for (let object of containerState.hiddenTabs) { // eslint-disable-line prefer-const
// do not show already opened url // do not show already opened url
if (object.url !== options.toHide) { if (object.url !== options.alreadyShowingUrl) {
promises.push(this.openNewTab({ promises.push(this.openNewTab({
userContextId: userContextId, userContextId: userContextId,
url: object.url, url: object.url,

View file

@ -153,7 +153,6 @@ const messageHandler = {
!tab.url.startsWith("moz-extension")) { !tab.url.startsWith("moz-extension")) {
// increment the counter of container tabs opened // increment the counter of container tabs opened
this.incrementCountOfContainerTabsOpened(); this.incrementCountOfContainerTabsOpened();
}
this.tabUpdateHandler = (tabId, changeInfo) => { this.tabUpdateHandler = (tabId, changeInfo) => {
if (tabId === tab.id && changeInfo.status === "complete") { if (tabId === tab.id && changeInfo.status === "complete") {
@ -174,6 +173,7 @@ const messageHandler = {
browser.tabs.onUpdated.addListener(this.tabUpdateHandler); browser.tabs.onUpdated.addListener(this.tabUpdateHandler);
} }
} }
}
setTimeout(() => { setTimeout(() => {
this.lastCreatedTab = null; this.lastCreatedTab = null;
}, this.LAST_CREATED_TAB_TIMER); }, this.LAST_CREATED_TAB_TIMER);