Skip to content

Commit

Permalink
ensure tab scroll in view
Browse files Browse the repository at this point in the history
  • Loading branch information
117649 committed May 13, 2022
1 parent e3be2e2 commit 9a49fb7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions resource/modules/TabItems.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,9 @@ this.TabItems = {
if(!UI.isTabViewVisible()) {
let thumbUpdate = new Promise(async resolve =>{
let accumTime = 0;
let items = this._tabsWaitingForUpdate.getItems();
while(accumTime < this._maxTimeForUpdating && items.length) {
while(accumTime < this._maxTimeForUpdating && this._tabsWaitingForUpdate.getItems().length) {
let updateBegin = Date.now();
await Promise.allSettled(items.splice(0, this._maxNumberForUpdate).map(x=>this._update(x)));
await Promise.allSettled(this._tabsWaitingForUpdate.getItems().splice(0, this._maxNumberForUpdate).map(x=>this._update(x)));
let updateEnd = Date.now();
let deltaTime = updateEnd - updateBegin;
accumTime += deltaTime;
Expand Down

0 comments on commit 9a49fb7

Please sign in to comment.