Page MenuHomePhabricator

D11627.diff
No OneTemporary

D11627.diff

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

Mime Type
text/plain
Expires
Fri, Nov 29, 6:52 PM (21 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597826
Default Alt Text
D11627.diff (3 KB)

Event Timeline