Skip to content

Commit fd4d383

Browse files
authored
fix: init settings with settings: null (#787)
1 parent 6131e57 commit fd4d383

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/context/App.test.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ describe('context/App.tsx', () => {
290290
participating: true,
291291
playSound: true,
292292
showNotifications: true,
293-
colors: false,
293+
colors: null,
294294
markAsDoneOnOpen: false,
295295
},
296296
);
@@ -328,7 +328,7 @@ describe('context/App.tsx', () => {
328328
participating: false,
329329
playSound: true,
330330
showNotifications: true,
331-
colors: false,
331+
colors: null,
332332
markAsDoneOnOpen: false,
333333
},
334334
);

src/context/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const defaultSettings: SettingsState = {
3636
showNotifications: true,
3737
openAtStartup: false,
3838
appearance: Appearance.SYSTEM,
39-
colors: false,
39+
colors: null,
4040
markAsDoneOnOpen: false,
4141
};
4242

src/hooks/useNotifications.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const useNotifications = (colors: boolean): NotificationsState => {
105105
]
106106
: [...enterpriseNotifications];
107107

108-
if (!colors) {
108+
if (colors === false) {
109109
setNotifications(data);
110110
triggerNativeNotifications(
111111
notifications,

src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface SettingsState {
1212
showNotifications: boolean;
1313
openAtStartup: boolean;
1414
appearance: Appearance;
15-
colors: boolean;
15+
colors: boolean | null;
1616
markAsDoneOnOpen: boolean;
1717
}
1818

0 commit comments

Comments
 (0)