Changeset View
Changeset View
Standalone View
Standalone View
native/redux/action-types.js
// @flow | // @flow | ||||
import type { Orientations } from 'react-native-orientation-locker'; | import type { Orientations } from 'react-native-orientation-locker'; | ||||
import { saveMessagesActionType } from 'lib/actions/message-actions.js'; | import { saveMessagesActionType } from 'lib/actions/message-actions.js'; | ||||
import type { Shape } from 'lib/types/core.js'; | import type { Shape } from 'lib/types/core.js'; | ||||
import type { BaseAction } from 'lib/types/redux-types.js'; | import type { BaseAction } from 'lib/types/redux-types.js'; | ||||
import type { DimensionsInfo } from './dimensions-updater.react.js'; | import type { DimensionsInfo } from './dimensions-updater.react.js'; | ||||
import type { AppState } from './state-types.js'; | import type { AppState } from './state-types.js'; | ||||
import type { DeviceCameraInfo } from '../types/camera.js'; | import type { DeviceCameraInfo } from '../types/camera.js'; | ||||
import type { ConnectivityInfo } from '../types/connectivity.js'; | import type { ConnectivityInfo } from '../types/connectivity.js'; | ||||
import type { GlobalThemeInfo } from '../types/themes.js'; | import type { GlobalThemeInfo } from '../types/themes.js'; | ||||
export const resetUserStateActionType = 'RESET_USER_STATE'; | export const resetUserStateActionType = 'RESET_USER_STATE'; | ||||
export const recordNotifPermissionAlertActionType = | |||||
'RECORD_NOTIF_PERMISSION_ALERT'; | |||||
export const updateDimensionsActiveType = 'UPDATE_DIMENSIONS'; | export const updateDimensionsActiveType = 'UPDATE_DIMENSIONS'; | ||||
export const updateConnectivityActiveType = 'UPDATE_CONNECTIVITY'; | export const updateConnectivityActiveType = 'UPDATE_CONNECTIVITY'; | ||||
export const updateThemeInfoActionType = 'UPDATE_THEME_INFO'; | export const updateThemeInfoActionType = 'UPDATE_THEME_INFO'; | ||||
export const updateDeviceCameraInfoActionType = 'UPDATE_DEVICE_CAMERA_INFO'; | export const updateDeviceCameraInfoActionType = 'UPDATE_DEVICE_CAMERA_INFO'; | ||||
export const updateDeviceOrientationActionType = 'UPDATE_DEVICE_ORIENTATION'; | export const updateDeviceOrientationActionType = 'UPDATE_DEVICE_ORIENTATION'; | ||||
export const updateThreadLastNavigatedActionType = | export const updateThreadLastNavigatedActionType = | ||||
'UPDATE_THREAD_LAST_NAVIGATED'; | 'UPDATE_THREAD_LAST_NAVIGATED'; | ||||
export const setStoreLoadedActionType = 'SET_STORE_LOADED'; | export const setStoreLoadedActionType = 'SET_STORE_LOADED'; | ||||
export const setReduxStateActionType = 'SET_REDUX_STATE'; | export const setReduxStateActionType = 'SET_REDUX_STATE'; | ||||
export const backgroundActionTypes: Set<string> = new Set([ | export const backgroundActionTypes: Set<string> = new Set([ | ||||
saveMessagesActionType, | saveMessagesActionType, | ||||
]); | ]); | ||||
export type Action = | export type Action = | ||||
| BaseAction | | BaseAction | ||||
| { | | { | ||||
+type: 'SET_REDUX_STATE', | +type: 'SET_REDUX_STATE', | ||||
+payload: { +state: AppState, +hideFromMonitor: boolean }, | +payload: { +state: AppState, +hideFromMonitor: boolean }, | ||||
} | } | ||||
| { | | { | ||||
+type: 'SET_CUSTOM_SERVER', | +type: 'SET_CUSTOM_SERVER', | ||||
+payload: string, | +payload: string, | ||||
} | } | ||||
| { | |||||
+type: 'RECORD_NOTIF_PERMISSION_ALERT', | |||||
+payload: { +time: number }, | |||||
} | |||||
| { +type: 'RESET_USER_STATE' } | | { +type: 'RESET_USER_STATE' } | ||||
| { | | { | ||||
+type: 'UPDATE_DIMENSIONS', | +type: 'UPDATE_DIMENSIONS', | ||||
+payload: Shape<DimensionsInfo>, | +payload: Shape<DimensionsInfo>, | ||||
} | } | ||||
| { | | { | ||||
+type: 'UPDATE_CONNECTIVITY', | +type: 'UPDATE_CONNECTIVITY', | ||||
+payload: ConnectivityInfo, | +payload: ConnectivityInfo, | ||||
Show All 20 Lines |