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

repl filter: update badge on repl change

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