Skip to content

Commit

Permalink
Accept missing last visible tab
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Feb 1, 2024
1 parent 3943747 commit 6e2480e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions webextensions/sidebar/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,11 +767,11 @@ function updateTabbarLayout({ reasons, timeout, justNow } = {}) {
log(`updateTabbarLayout reasons: ${readableReasons.join(',')}`);

const lastVisibleTab = Tab.getLastVisibleTab(mTargetWindow);
if ((!lastVisibleTab && mLastVisibleTabId) ||
(lastVisibleTab && lastVisibleTab.id != mLastVisibleTabId)) {
if (mLastVisibleTabId)
Tab.get(mLastVisibleTabId).$TST.removeState(Constants.kTAB_STATE_LAST_VISIBLE);
}
const previousLastVisibleTab = mLastVisibleTabId && Tab.get(mLastVisibleTabId);
if (previousLastVisibleTab &&
(!lastVisibleTab ||
lastVisibleTab.id != previousLastVisibleTab.id))
previousLastVisibleTab.$TST.removeState(Constants.kTAB_STATE_LAST_VISIBLE);
lastVisibleTab.$TST.addState(Constants.kTAB_STATE_LAST_VISIBLE);
mLastVisibleTabId = lastVisibleTab && lastVisibleTab.id;

Expand Down

0 comments on commit 6e2480e

Please sign in to comment.