@@ -14,23 +14,17 @@ import { useTheme } from '@primer/react';
1414import { namespacedEvent } from '../../shared/events' ;
1515import { useInterval } from '../hooks/useInterval' ;
1616import { useNotifications } from '../hooks/useNotifications' ;
17- import {
18- type Account ,
19- type AccountNotifications ,
20- type AppearanceSettingsState ,
21- type AuthState ,
22- type FilterSettingsState ,
23- type FilterValue ,
24- type GitifyError ,
25- GroupBy ,
26- type NotificationSettingsState ,
27- OpenPreference ,
28- type SettingsState ,
29- type SettingsValue ,
30- type Status ,
31- type SystemSettingsState ,
32- Theme ,
33- type Token ,
17+ import type {
18+ Account ,
19+ AccountNotifications ,
20+ AuthState ,
21+ FilterSettingsState ,
22+ FilterValue ,
23+ GitifyError ,
24+ SettingsState ,
25+ SettingsValue ,
26+ Status ,
27+ Token ,
3428} from '../types' ;
3529import type { Notification } from '../typesGitHub' ;
3630import { headNotifications } from '../utils/api/client' ;
@@ -64,59 +58,7 @@ import {
6458 mapThemeModeToColorScheme ,
6559} from '../utils/theme' ;
6660import { zoomPercentageToLevel } from '../utils/zoom' ;
67-
68- export const defaultAuth : AuthState = {
69- accounts : [ ] ,
70- } ;
71-
72- const defaultAppearanceSettings : AppearanceSettingsState = {
73- theme : Theme . SYSTEM ,
74- increaseContrast : false ,
75- zoomPercentage : 100 ,
76- showAccountHeader : false ,
77- wrapNotificationTitle : false ,
78- } ;
79-
80- const defaultNotificationSettings : NotificationSettingsState = {
81- groupBy : GroupBy . REPOSITORY ,
82- fetchAllNotifications : true ,
83- detailedNotifications : true ,
84- showPills : true ,
85- showNumber : true ,
86- participating : false ,
87- markAsDoneOnOpen : false ,
88- markAsDoneOnUnsubscribe : false ,
89- delayNotificationState : false ,
90- } ;
91-
92- const defaultSystemSettings : SystemSettingsState = {
93- openLinks : OpenPreference . FOREGROUND ,
94- keyboardShortcut : true ,
95- showNotificationsCountInTray : true ,
96- showNotifications : true ,
97- playSound : true ,
98- notificationVolume : 20 ,
99- useAlternateIdleIcon : false ,
100- openAtStartup : false ,
101- } ;
102-
103- export const defaultFilters : FilterSettingsState = {
104- filterUserTypes : [ ] ,
105- filterIncludeHandles : [ ] ,
106- filterExcludeHandles : [ ] ,
107- filterIncludeOrganizations : [ ] ,
108- filterExcludeOrganizations : [ ] ,
109- filterSubjectTypes : [ ] ,
110- filterStates : [ ] ,
111- filterReasons : [ ] ,
112- } ;
113-
114- export const defaultSettings : SettingsState = {
115- ...defaultAppearanceSettings ,
116- ...defaultNotificationSettings ,
117- ...defaultSystemSettings ,
118- ...defaultFilters ,
119- } ;
61+ import { defaultAuth , defaultFilters , defaultSettings } from './defaults' ;
12062
12163interface AppContextState {
12264 auth : AuthState ;
0 commit comments