Reduce needless API call
This commit is contained in:
parent
c60ad4f969
commit
0383836188
1 changed files with 2 additions and 2 deletions
|
@ -238,7 +238,7 @@ const backgroundLogic = {
|
|||
},
|
||||
|
||||
async sortTabs() {
|
||||
const windows = await browser.windows.getAll();
|
||||
const windows = await browser.windows.getAll({ populate: true });
|
||||
for (let windowObj of windows) { // eslint-disable-line prefer-const
|
||||
// First the pinned tabs, then the normal ones.
|
||||
await this._sortTabsInternal(windowObj, true);
|
||||
|
@ -247,7 +247,7 @@ const backgroundLogic = {
|
|||
},
|
||||
|
||||
async _sortTabsInternal(windowObj, pinnedTabs) {
|
||||
const tabs = await browser.tabs.query({windowId: windowObj.id});
|
||||
const tabs = windowObj.tabs;
|
||||
let pos = 0;
|
||||
|
||||
// Let's collect UCIs/tabs for this window.
|
||||
|
|
Loading…
Add table
Reference in a new issue