diff options
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.ts | 3 |
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' | |||
3 | import { Component, Input, OnInit } from '@angular/core' | 3 | import { Component, Input, OnInit } from '@angular/core' |
4 | import { Notifier, ServerService, User } from '@app/core' | 4 | import { Notifier, ServerService, User } from '@app/core' |
5 | import { UserNotificationService } from '@app/shared/shared-main' | 5 | import { UserNotificationService } from '@app/shared/shared-main' |
6 | import { objectKeysTyped } from '@shared/core-utils' | ||
6 | import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '@shared/models' | 7 | import { 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 | ||