disabling avatar notifications functionnal
This commit is contained in:
parent
d7d1952c5e
commit
6eb3e44923
|
@ -133,11 +133,16 @@ export class LeftSideBarComponent implements OnInit, OnDestroy {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.notificationSub = this.userNotificationServiceService.userNotifications.subscribe((notifications: UserNotification[]) => {
|
this.notificationSub = this.userNotificationServiceService.userNotifications.subscribe((notifications: UserNotification[]) => {
|
||||||
|
const settings = this.toolsService.getSettings();
|
||||||
notifications.forEach((notification: UserNotification) => {
|
notifications.forEach((notification: UserNotification) => {
|
||||||
const acc = this.accounts.find(x => x.info.id === notification.account.id);
|
const acc = this.accounts.find(x => x.info.id === notification.account.id);
|
||||||
|
|
||||||
if (acc) {
|
if (acc) {
|
||||||
|
const accSettings = settings.accountSettings.find(x => x.accountId === acc.info.id);
|
||||||
|
if (!settings.disableAvatarNotifications && !accSettings.disableAvatarNotifications) {
|
||||||
acc.hasActivityNotifications = notification.hasNewMentions || notification.hasNewNotifications;
|
acc.hasActivityNotifications = notification.hasNewMentions || notification.hasNewNotifications;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue