Page MenuHomePhabricator

D5645.id18465.diff
No OneTemporary

D5645.id18465.diff

diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -11,6 +11,7 @@
import { inconsistencyResponsesToReports } from 'lib/shared/report-utils';
import { getContainingThreadID, getCommunity } from 'lib/shared/thread-utils';
import { unshimMessageStore } from 'lib/shared/unshim-utils';
+import type { DraftStore } from 'lib/types/draft-types';
import { defaultEnabledApps } from 'lib/types/enabled-apps';
import { defaultCalendarFilters } from 'lib/types/filter-types';
import {
@@ -418,6 +419,19 @@
{ whitelist: ['messageStore'] },
);
+type PersistedDraftStore = {};
+
+const draftStoreDraftsBlocklistTransform: Transform = createTransform(
+ (state: DraftStore): PersistedDraftStore => {
+ const { drafts, ...draftStoreSansDrafts } = state;
+ return draftStoreSansDrafts;
+ },
+ (state: PersistedDraftStore): DraftStore => {
+ return { ...state, drafts: {} };
+ },
+ { whitelist: ['draftStore'] },
+);
+
const persistConfig = {
key: 'root',
storage: AsyncStorage,
@@ -432,7 +446,10 @@
],
debug: __DEV__,
version: 31,
- transforms: [messageStoreMessagesBlocklistTransform],
+ transforms: [
+ messageStoreMessagesBlocklistTransform,
+ draftStoreDraftsBlocklistTransform,
+ ],
migrate: (createMigrate(migrations, { debug: __DEV__ }): any),
timeout: ((__DEV__ ? 0 : undefined): number | void),
};

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 3:44 PM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580355
Default Alt Text
D5645.id18465.diff (1 KB)

Event Timeline