Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33017581
D9530.1768381142.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D9530.1768381142.diff
View Options
diff --git a/lib/actions/theme-actions.js b/lib/actions/theme-actions.js
new file mode 100644
--- /dev/null
+++ b/lib/actions/theme-actions.js
@@ -0,0 +1,5 @@
+// @flow
+
+const updateThemeInfoActionType = 'UPDATE_THEME_INFO';
+
+export { updateThemeInfoActionType };
diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js
--- a/lib/types/redux-types.js
+++ b/lib/types/redux-types.js
@@ -100,6 +100,7 @@
UpdateDisconnectedBarPayload,
} from './socket-types.js';
import type { SubscriptionUpdateResult } from './subscription-types.js';
+import type { GlobalThemeInfo } from './theme-types.js';
import type { ThreadActivityStore } from './thread-activity-types.js';
import type {
ThreadStore,
@@ -1223,6 +1224,10 @@
+threadIDsToHash?: $ReadOnlyArray<string>,
+threadHashingStatus?: 'starting' | 'running' | 'completed',
},
+ }
+ | {
+ +type: 'UPDATE_THEME_INFO',
+ +payload: Shape<GlobalThemeInfo>,
};
export type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string);
diff --git a/native/profile/appearance-preferences.react.js b/native/profile/appearance-preferences.react.js
--- a/native/profile/appearance-preferences.react.js
+++ b/native/profile/appearance-preferences.react.js
@@ -5,6 +5,7 @@
import { ScrollView } from 'react-native-gesture-handler';
import { useDispatch } from 'react-redux';
+import { updateThemeInfoActionType } from 'lib/actions/theme-actions.js';
import type { Dispatch } from 'lib/types/redux-types.js';
import type {
GlobalThemeInfo,
@@ -13,7 +14,6 @@
import Button from '../components/button.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
-import { updateThemeInfoActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
import { type Colors, useColors, useStyles } from '../themes/colors.js';
import { osCanTheme } from '../themes/theme-utils.js';
diff --git a/native/redux/action-types.js b/native/redux/action-types.js
--- a/native/redux/action-types.js
+++ b/native/redux/action-types.js
@@ -5,7 +5,6 @@
import { saveMessagesActionType } from 'lib/actions/message-actions.js';
import type { Shape } from 'lib/types/core.js';
import type { BaseAction } from 'lib/types/redux-types.js';
-import type { GlobalThemeInfo } from 'lib/types/theme-types.js';
import type { DimensionsInfo } from './dimensions-updater.react.js';
import type { AppState } from './state-types.js';
@@ -15,7 +14,6 @@
export const updateDimensionsActiveType = 'UPDATE_DIMENSIONS';
export const updateConnectivityActiveType = 'UPDATE_CONNECTIVITY';
-export const updateThemeInfoActionType = 'UPDATE_THEME_INFO';
export const updateDeviceCameraInfoActionType = 'UPDATE_DEVICE_CAMERA_INFO';
export const updateDeviceOrientationActionType = 'UPDATE_DEVICE_ORIENTATION';
export const setStoreLoadedActionType = 'SET_STORE_LOADED';
@@ -44,10 +42,6 @@
+type: 'UPDATE_CONNECTIVITY',
+payload: ConnectivityInfo,
}
- | {
- +type: 'UPDATE_THEME_INFO',
- +payload: Shape<GlobalThemeInfo>,
- }
| {
+type: 'UPDATE_DEVICE_CAMERA_INFO',
+payload: Shape<DeviceCameraInfo>,
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -7,6 +7,7 @@
import { setClientDBStoreActionType } from 'lib/actions/client-db-store-actions.js';
import { siweAuthActionTypes } from 'lib/actions/siwe-actions.js';
+import { updateThemeInfoActionType } from 'lib/actions/theme-actions.js';
import {
logOutActionTypes,
deleteAccountActionTypes,
@@ -29,7 +30,6 @@
import {
updateDimensionsActiveType,
updateConnectivityActiveType,
- updateThemeInfoActionType,
updateDeviceCameraInfoActionType,
updateDeviceOrientationActionType,
backgroundActionTypes,
diff --git a/native/redux/theme-reducer.js b/native/redux/theme-reducer.js
--- a/native/redux/theme-reducer.js
+++ b/native/redux/theme-reducer.js
@@ -1,6 +1,7 @@
// @flow
import { siweAuthActionTypes } from 'lib/actions/siwe-actions.js';
+import { updateThemeInfoActionType } from 'lib/actions/theme-actions.js';
import {
logOutActionTypes,
deleteAccountActionTypes,
@@ -13,7 +14,7 @@
} from 'lib/types/theme-types.js';
import { setNewSessionActionType } from 'lib/utils/action-utils.js';
-import { updateThemeInfoActionType, type Action } from './action-types.js';
+import type { Action } from './action-types.js';
export default function reduceGlobalThemeInfo(
state: GlobalThemeInfo,
diff --git a/native/themes/theme-handler.react.js b/native/themes/theme-handler.react.js
--- a/native/themes/theme-handler.react.js
+++ b/native/themes/theme-handler.react.js
@@ -5,10 +5,10 @@
import { Appearance } from 'react-native';
import { useDispatch } from 'react-redux';
+import { updateThemeInfoActionType } from 'lib/actions/theme-actions.js';
import type { Shape } from 'lib/types/core.js';
import type { GlobalTheme, GlobalThemeInfo } from 'lib/types/theme-types.js';
-import { updateThemeInfoActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
import { osCanTheme } from '../themes/theme-utils.js';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 8:59 AM (37 m, 52 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5931196
Default Alt Text
D9530.1768381142.diff (5 KB)
Attached To
Mode
D9530: [lib/naitve] lift update theme info action type into lib
Attached
Detach File
Event Timeline
Log In to Comment