提交 39f691ca 编写于 作者: S Sandeep Somavarapu

Fix #71165

上级 ed41004a
......@@ -61,15 +61,16 @@ export class ActivityUpdater extends Disposable implements IWorkbenchContributio
constructor(
@IActivityService private readonly activityService: IActivityService,
@IMarkersWorkbenchService private readonly markersWorkbenchService: IMarkersWorkbenchService
@IMarkerService private readonly markerService: IMarkerService
) {
super();
this._register(this.markersWorkbenchService.markersModel.onDidChange(() => this.updateBadge()));
this._register(this.markerService.onMarkerChanged(() => this.updateBadge()));
this.updateBadge();
}
private updateBadge(): void {
const total = this.markersWorkbenchService.markersModel.resourceMarkers.reduce((r, rm) => r + rm.markers.length, 0);
const { errors, warnings, infos, unknowns } = this.markerService.getStatistics();
const total = errors + warnings + infos + unknowns;
const message = localize('totalProblems', 'Total {0} Problems', total);
this.activityService.showActivity(Constants.MARKERS_PANEL_ID, new NumberBadge(total, () => message));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册