Skip to content

Commit

Permalink
Make initial load of panorama view faster
Browse files Browse the repository at this point in the history
  • Loading branch information
photodiode committed Oct 19, 2021
1 parent fe6866f commit 7b57a2a
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/panorama/js/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ export let viewWindowId = undefined;
export let viewTabId = undefined;



/*if (browser.tabGroups == undefined) {
browser.tabGroups = {
get: () => {
return 32;
}
};
console.log(browser.tabGroups.get());
}*/



async function initialize() {

viewWindowId = (await browser.windows.getCurrent()).id;
Expand Down Expand Up @@ -155,10 +168,12 @@ async function initializeTabNodes() {
let tabs = await browser.tabs.query({currentWindow: true});

var fragments = {};

await Promise.all(tabs.map(async(tab) => {
tab.groupId = await addon.tabs.getGroupId(tab.id);
}));

for (let tab of tabs) {

tab.groupId = await addon.tabs.getGroupId(tab.id);

let tabNode = html.tabs.create(tab);
html.tabs.update(tabNode, tab);
Expand Down

0 comments on commit 7b57a2a

Please sign in to comment.