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:
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