aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-24 17:22:40 +0200
committerChocobozzz <me@florianbigard.com>2023-05-24 17:22:40 +0200
commitf9735a9e88ff59dae8c9f6b8a20576ca8a08902b (patch)
treefca3fe7b02c309616359cb6799396f57029a4f77 /client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
parent431ebbd5e40cdae5326bcd631d9e086cfa4eae1e (diff)
downloadPeerTube-f9735a9e88ff59dae8c9f6b8a20576ca8a08902b.tar.gz
PeerTube-f9735a9e88ff59dae8c9f6b8a20576ca8a08902b.tar.zst
PeerTube-f9735a9e88ff59dae8c9f6b8a20576ca8a08902b.zip
Fix notification settings
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
index 8faba676e..2adc276a9 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
@@ -3,6 +3,7 @@ import { Subject } from 'rxjs'
3import { Component, Input, OnInit } from '@angular/core' 3import { Component, Input, OnInit } from '@angular/core'
4import { Notifier, ServerService, User } from '@app/core' 4import { Notifier, ServerService, User } from '@app/core'
5import { UserNotificationService } from '@app/shared/shared-main' 5import { UserNotificationService } from '@app/shared/shared-main'
6import { objectKeysTyped } from '@shared/core-utils'
6import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '@shared/models' 7import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '@shared/models'
7 8
8@Component({ 9@Component({
@@ -141,7 +142,7 @@ export class MyAccountNotificationPreferencesComponent implements OnInit {
141 } 142 }
142 143
143 private loadNotificationSettings () { 144 private loadNotificationSettings () {
144 for (const key of Object.keys(this.user.notificationSettings) as (keyof UserNotificationSetting)[]) { 145 for (const key of objectKeysTyped(this.user.notificationSettings)) {
145 const value = this.user.notificationSettings[key] 146 const value = this.user.notificationSettings[key]
146 this.emailNotifications[key] = !!(value & UserNotificationSettingValue.EMAIL) 147 this.emailNotifications[key] = !!(value & UserNotificationSettingValue.EMAIL)
147 148