diff --git a/lib/types/alert-types.js b/lib/types/alert-types.js --- a/lib/types/alert-types.js +++ b/lib/types/alert-types.js @@ -2,6 +2,7 @@ const alertTypes = Object.freeze({ NOTIF_PERMISSION: 'notif-permission', + CONNECT_FARCASTER: 'connect-farcaster', }); type AlertType = $Values; @@ -24,4 +25,9 @@ lastAlertTime: 0, }; -export { alertTypes, defaultAlertInfo }; +const defaultAlertInfos: AlertInfos = Object.freeze({ + [alertTypes.NOTIF_PERMISSION]: defaultAlertInfo, + [alertTypes.CONNECT_FARCASTER]: defaultAlertInfo, +}); + +export { alertTypes, defaultAlertInfo, defaultAlertInfos }; diff --git a/lib/utils/reducers-utils.test.js b/lib/utils/reducers-utils.test.js --- a/lib/utils/reducers-utils.test.js +++ b/lib/utils/reducers-utils.test.js @@ -2,7 +2,7 @@ import { authoritativeKeyserverID } from './authoritative-keyserver.js'; import { resetUserSpecificState } from './reducers-utils.js'; -import { defaultAlertInfo, alertTypes } from '../types/alert-types.js'; +import { defaultAlertInfos } from '../types/alert-types.js'; import { defaultWebEnabledApps } from '../types/enabled-apps.js'; import { defaultCalendarFilters } from '../types/filter-types.js'; import { defaultKeyserverInfo } from '../types/keyserver-types.js'; @@ -47,9 +47,7 @@ calendarFilters: defaultCalendarFilters, dataLoaded: false, alertStore: { - alertInfos: { - [alertTypes.NOTIF_PERMISSION]: defaultAlertInfo, - }, + alertInfos: defaultAlertInfos, }, watchedThreadIDs: [], lifecycleState: 'active', diff --git a/native/redux/default-state.js b/native/redux/default-state.js --- a/native/redux/default-state.js +++ b/native/redux/default-state.js @@ -3,7 +3,7 @@ import { Platform } from 'react-native'; import Orientation from 'react-native-orientation-locker'; -import { defaultAlertInfo, alertTypes } from 'lib/types/alert-types.js'; +import { defaultAlertInfos } from 'lib/types/alert-types.js'; import { defaultEnabledApps } from 'lib/types/enabled-apps.js'; import { defaultCalendarFilters } from 'lib/types/filter-types.js'; import { defaultKeyserverInfo } from 'lib/types/keyserver-types.js'; @@ -44,9 +44,7 @@ dataLoaded: false, customServer: natNodeServer, alertStore: { - alertInfos: { - [alertTypes.NOTIF_PERMISSION]: defaultAlertInfo, - }, + alertInfos: defaultAlertInfos, }, watchedThreadIDs: [], lifecycleState: 'active', diff --git a/web/redux/default-state.js b/web/redux/default-state.js --- a/web/redux/default-state.js +++ b/web/redux/default-state.js @@ -1,6 +1,6 @@ // @flow -import { defaultAlertInfo, alertTypes } from 'lib/types/alert-types.js'; +import { defaultAlertInfos } from 'lib/types/alert-types.js'; import { defaultWebEnabledApps } from 'lib/types/enabled-apps.js'; import { defaultCalendarFilters } from 'lib/types/filter-types.js'; import { defaultKeyserverInfo } from 'lib/types/keyserver-types.js'; @@ -45,9 +45,7 @@ calendarFilters: defaultCalendarFilters, dataLoaded: false, alertStore: { - alertInfos: { - [alertTypes.NOTIF_PERMISSION]: defaultAlertInfo, - }, + alertInfos: defaultAlertInfos, }, watchedThreadIDs: [], lifecycleState: 'active',