mirror of
https://github.com/revoltchat/revite.git
synced 2025-02-22 00:00:56 -05:00
fix(settings): persist false-y values
This commit is contained in:
parent
301070a3cb
commit
bb707fb287
2 changed files with 3 additions and 2 deletions
|
@ -75,7 +75,8 @@ export default class Settings
|
||||||
@action hydrate(data: ISettings) {
|
@action hydrate(data: ISettings) {
|
||||||
Object.keys(data).forEach(
|
Object.keys(data).forEach(
|
||||||
(key) =>
|
(key) =>
|
||||||
(data as any)[key] && this.data.set(key, (data as any)[key]),
|
typeof (data as any)[key] !== "undefined" &&
|
||||||
|
this.data.set(key, (data as any)[key]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ export default observer(() => {
|
||||||
!state.settings.get("appearance:seasonal"),
|
!state.settings.get("appearance:seasonal"),
|
||||||
);
|
);
|
||||||
|
|
||||||
const seasonalTheme = state.settings.get("appearance:seasonal") ?? true;
|
const seasonalTheme = state.settings.get("appearance:seasonal", true);
|
||||||
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
|
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
|
||||||
const snowflakes = useMemo(() => {
|
const snowflakes = useMemo(() => {
|
||||||
const flakes = [];
|
const flakes = [];
|
||||||
|
|
Loading…
Add table
Reference in a new issue