From: Chocobozzz Date: Wed, 24 May 2023 15:22:40 +0000 (+0200) Subject: Fix notification settings X-Git-Tag: v5.2.0-rc.1~37 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=f9735a9e88ff59dae8c9f6b8a20576ca8a08902b;hp=431ebbd5e40cdae5326bcd631d9e086cfa4eae1e;p=github%2FChocobozzz%2FPeerTube.git Fix notification settings --- diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html index 46f5e5d6b..2af9d576a 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html @@ -12,6 +12,7 @@
@@ -19,6 +20,7 @@
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' import { Component, Input, OnInit } from '@angular/core' import { Notifier, ServerService, User } from '@app/core' import { UserNotificationService } from '@app/shared/shared-main' +import { objectKeysTyped } from '@shared/core-utils' import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '@shared/models' @Component({ @@ -141,7 +142,7 @@ export class MyAccountNotificationPreferencesComponent implements OnInit { } private loadNotificationSettings () { - for (const key of Object.keys(this.user.notificationSettings) as (keyof UserNotificationSetting)[]) { + for (const key of objectKeysTyped(this.user.notificationSettings)) { const value = this.user.notificationSettings[key] this.emailNotifications[key] = !!(value & UserNotificationSettingValue.EMAIL) diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html index 2bbe26c96..59ee57b16 100644 --- a/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html +++ b/client/src/app/+videos/+video-watch/shared/recommendations/recommended-videos.component.html @@ -7,7 +7,7 @@ [ngbTooltip]="autoPlayNextVideoTooltip" placement="bottom-right auto" > AUTOPLAY - +
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html index 10b3f15d9..c23bb4f5b 100644 --- a/client/src/app/menu/menu.component.html +++ b/client/src/app/menu/menu.component.html @@ -61,7 +61,7 @@ Help share videos - + diff --git a/client/src/app/shared/shared-forms/input-switch.component.ts b/client/src/app/shared/shared-forms/input-switch.component.ts index abb96de62..f340ce81e 100644 --- a/client/src/app/shared/shared-forms/input-switch.component.ts +++ b/client/src/app/shared/shared-forms/input-switch.component.ts @@ -20,6 +20,7 @@ export class InputSwitchComponent implements ControlValueAccessor { propagateChange = (_: any) => { /* empty */ } writeValue (checked: boolean) { + console.log(checked) this.checked = checked } @@ -32,6 +33,7 @@ export class InputSwitchComponent implements ControlValueAccessor { } update () { + console.log(this.checked) this.checked = !this.checked this.propagateChange(this.checked) }