Skip to content

Commit

Permalink
notifications - make #50931 a bit better
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Apr 4, 2019
1 parent 2b0b913 commit a668b4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -191,6 +191,10 @@ export class NotificationsToasts extends Themable {

// Update when item height potentially changes due to label changes
itemDisposeables.push(item.onDidLabelChange(e => {
if (!item.expanded) {
return; // dynamic height only applies to expanded notifications
}

if (e.kind === NotificationViewItemLabelKind.ACTIONS || e.kind === NotificationViewItemLabelKind.MESSAGE) {
notificationList.updateNotificationsList(0, 1, [item]);
}
Expand Down
Expand Up @@ -350,6 +350,9 @@ export class NotificationTemplateRenderer {
case NotificationViewItemLabelKind.PROGRESS:
this.renderProgress(notification);
break;
case NotificationViewItemLabelKind.MESSAGE:
this.renderMessage(notification);
break;
}
}));
}
Expand Down

0 comments on commit a668b4f

Please sign in to comment.