fix #45026
This commit is contained in:
parent
edba453692
commit
6855db2160
2 changed files with 14 additions and 2 deletions
|
@ -71,6 +71,10 @@ export class NotificationsCenter extends Themable {
|
|||
}
|
||||
|
||||
public show(): void {
|
||||
if (this.model.notifications.length === 0) {
|
||||
return; // currently not supporting to show empty (https://github.com/Microsoft/vscode/issues/44509)
|
||||
}
|
||||
|
||||
if (this._isVisible) {
|
||||
this.notificationsList.show(true /* focus */);
|
||||
|
||||
|
|
|
@ -81,7 +81,9 @@ export function registerNotificationCommands(center: INotificationsCenterControl
|
|||
}
|
||||
|
||||
// Show Notifications Cneter
|
||||
CommandsRegistry.registerCommand(SHOW_NOTIFICATIONS_CENTER, () => center.show());
|
||||
CommandsRegistry.registerCommand(SHOW_NOTIFICATIONS_CENTER, () => {
|
||||
center.show();
|
||||
});
|
||||
|
||||
// Hide Notifications Center
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
|
@ -93,7 +95,13 @@ export function registerNotificationCommands(center: INotificationsCenterControl
|
|||
});
|
||||
|
||||
// Toggle Notifications Center
|
||||
CommandsRegistry.registerCommand(TOGGLE_NOTIFICATIONS_CENTER, accessor => center.isVisible ? center.hide() : center.show());
|
||||
CommandsRegistry.registerCommand(TOGGLE_NOTIFICATIONS_CENTER, accessor => {
|
||||
if (center.isVisible) {
|
||||
center.hide();
|
||||
} else {
|
||||
center.show();
|
||||
}
|
||||
});
|
||||
|
||||
// Clear Notification
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
|
|
Loading…
Reference in a new issue