Skip to content

Commit

Permalink
Zen mode react on silentNotifcations setting change
Browse files Browse the repository at this point in the history
fixes #83535
  • Loading branch information
isidorn committed Nov 12, 2019
1 parent 8faa1d5 commit a7d4660
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/vs/workbench/browser/layout.ts
Expand Up @@ -747,6 +747,13 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
if (config.silentNotifications) {
this.notificationService.setFilter(NotificationsFilter.ERROR);
}
this.state.zenMode.transitionDisposables.add(this.configurationService.onDidChangeConfiguration(c => {
const silentNotificationsKey = 'zenMode.silentNotifications';
if (c.affectsConfiguration(silentNotificationsKey)) {
const filter = this.configurationService.getValue(silentNotificationsKey) ? NotificationsFilter.ERROR : NotificationsFilter.OFF;
this.notificationService.setFilter(filter);
}
}));

if (config.centerLayout) {
this.centerEditorLayout(true, true);
Expand Down

0 comments on commit a7d4660

Please sign in to comment.