Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32562125
D11627.1767333269.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D11627.1767333269.diff
View Options
diff --git a/lib/actions/synced-metadata-actions.js b/lib/actions/synced-metadata-actions.js
--- a/lib/actions/synced-metadata-actions.js
+++ b/lib/actions/synced-metadata-actions.js
@@ -1,10 +1,7 @@
// @flow
-const addSyncedMetadataEntryActionType = 'ADD_SYNCED_METADATA_ENTRY';
+const setSyncedMetadataEntryActionType = 'SET_SYNCED_METADATA_ENTRY';
-const removeSyncedMetadataEntryActionType = 'REMOVE_SYNCED_METADATA_ENTRY';
+const clearSyncedMetadataEntryActionType = 'CLEAR_SYNCED_METADATA_ENTRY';
-export {
- addSyncedMetadataEntryActionType,
- removeSyncedMetadataEntryActionType,
-};
+export { setSyncedMetadataEntryActionType, clearSyncedMetadataEntryActionType };
diff --git a/lib/reducers/synced-metadata-reducer.js b/lib/reducers/synced-metadata-reducer.js
--- a/lib/reducers/synced-metadata-reducer.js
+++ b/lib/reducers/synced-metadata-reducer.js
@@ -2,8 +2,8 @@
import { setClientDBStoreActionType } from '../actions/client-db-store-actions.js';
import {
- addSyncedMetadataEntryActionType,
- removeSyncedMetadataEntryActionType,
+ setSyncedMetadataEntryActionType,
+ clearSyncedMetadataEntryActionType,
} from '../actions/synced-metadata-actions.js';
import {
syncedMetadataStoreOpsHandlers,
@@ -24,7 +24,7 @@
+syncedMetadataStore: SyncedMetadataStore,
+syncedMetadataStoreOperations: $ReadOnlyArray<SyncedMetadataStoreOperation>,
} {
- if (action.type === addSyncedMetadataEntryActionType) {
+ if (action.type === setSyncedMetadataEntryActionType) {
const replaceOperation: ReplaceSyncedMetadataEntryOperation = {
type: 'replace_synced_metadata_entry',
payload: action.payload,
@@ -34,7 +34,7 @@
syncedMetadataStore: processStoreOps(state, [replaceOperation]),
syncedMetadataStoreOperations: [replaceOperation],
};
- } else if (action.type === removeSyncedMetadataEntryActionType) {
+ } else if (action.type === clearSyncedMetadataEntryActionType) {
const removeOperation: RemoveSyncedMetadataOperation = {
type: 'remove_synced_metadata',
payload: {
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
@@ -115,8 +115,8 @@
import type { SubscriptionUpdateResult } from './subscription-types.js';
import type {
SyncedMetadataStore,
- AddSyncedMetadataEntryPayload,
- RemoveSyncedMetadataEntryPayload,
+ SetSyncedMetadataEntryPayload,
+ ClearSyncedMetadataEntryPayload,
} from './synced-metadata-types.js';
import type { GlobalThemeInfo } from './theme-types.js';
import type { ThreadActivityStore } from './thread-activity-types.js';
@@ -1373,12 +1373,12 @@
+payload: AddCommunityPayload,
}
| {
- +type: 'ADD_SYNCED_METADATA_ENTRY',
- +payload: AddSyncedMetadataEntryPayload,
+ +type: 'SET_SYNCED_METADATA_ENTRY',
+ +payload: SetSyncedMetadataEntryPayload,
}
| {
- +type: 'REMOVE_SYNCED_METADATA_ENTRY',
- +payload: RemoveSyncedMetadataEntryPayload,
+ +type: 'CLEAR_SYNCED_METADATA_ENTRY',
+ +payload: ClearSyncedMetadataEntryPayload,
}
| {
+type: 'SET_ACTIVE_SESSION_RECOVERY',
diff --git a/lib/types/synced-metadata-types.js b/lib/types/synced-metadata-types.js
--- a/lib/types/synced-metadata-types.js
+++ b/lib/types/synced-metadata-types.js
@@ -6,11 +6,11 @@
+syncedMetadata: SyncedMetadata,
};
-export type AddSyncedMetadataEntryPayload = {
+export type SetSyncedMetadataEntryPayload = {
+name: string,
+data: string,
};
-export type RemoveSyncedMetadataEntryPayload = {
+export type ClearSyncedMetadataEntryPayload = {
+name: string,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 2, 5:54 AM (2 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5878464
Default Alt Text
D11627.1767333269.diff (3 KB)
Attached To
Mode
D11627: Rename addSyncedMetadata and removeSyncedMetadata action types to set and clear
Attached
Detach File
Event Timeline
Log In to Comment