Fix immediate notification card removal

pull/1163/head
voc0der 2 months ago
parent 0f79ff5e76
commit e17456fdc1

@ -85,10 +85,10 @@ export class NotificationsComponent implements OnInit {
deleteNotification(uid: string): void {
this.postsService.deleteNotification(uid).subscribe(res => {
this.notifications.filter(notification => notification['uid'] !== uid);
if (!this.notifications) return;
this.notifications = this.notifications.filter(notification => notification['uid'] !== uid);
this.filterNotifications();
this.notificationCount.emit(this.notifications.length);
this.getNotifications();
this.notificationCount.emit(this.notifications.filter(notification => !notification.read).length);
});
}

Loading…
Cancel
Save