diff --git a/app/components/Theme.tsx b/app/components/Theme.tsx index bbe8bd5b4..f1ef551d9 100644 --- a/app/components/Theme.tsx +++ b/app/components/Theme.tsx @@ -29,8 +29,7 @@ const Theme: React.FC = ({ children }) => { {children} diff --git a/app/models/User.ts b/app/models/User.ts index 3abe065d4..1cbc06711 100644 --- a/app/models/User.ts +++ b/app/models/User.ts @@ -1,6 +1,7 @@ import { subMinutes } from "date-fns"; import { computed, action, observable } from "mobx"; import { now } from "mobx-utils"; +import { UserPreferenceDefaults } from "@shared/constants"; import { NotificationEventDefaults, NotificationEventType, @@ -126,11 +127,10 @@ class User extends ParanoidModel { * none is set. * * @param key The UserPreference key to retrieve - * @param fallback An optional fallback value, defaults to false. * @returns The value */ - getPreference(key: UserPreference, fallback = false): boolean { - return this.preferences?.[key] ?? fallback; + getPreference(key: UserPreference): boolean { + return this.preferences?.[key] ?? UserPreferenceDefaults[key] ?? false; } /**