提交 8e826780 编写于 作者: I isidor

repl filter: update badge on repl change

上级 33c7ea63
......@@ -527,6 +527,8 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
// Only scroll if we were scrolled all the way down before tree refreshed #10486
revealLastElement(this.tree);
}
// Repl elements count changed, need to update filter stats on the badge
this.filterState.updateFilterStats();
}, Repl.REFRESH_DELAY);
}
......
......@@ -112,12 +112,15 @@ export class ReplFilterState {
if (this._filterText !== filterText) {
this._filterText = filterText;
this._onDidChange.fire();
this.updateFilterStats();
}
}
const { total, filtered } = this.filterStatsProvider.getFilterStats();
if (this._stats.total !== total || this._stats.filtered !== filtered) {
this._stats = { total, filtered };
this._onDidStatsChange.fire();
}
updateFilterStats(): void {
const { total, filtered } = this.filterStatsProvider.getFilterStats();
if (this._stats.total !== total || this._stats.filtered !== filtered) {
this._stats = { total, filtered };
this._onDidStatsChange.fire();
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册