Page MenuHomePhabricator

D5545.id18196.diff
No OneTemporary

D5545.id18196.diff

diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -18,7 +18,6 @@
type MessageStore,
messageTypes,
type ClientDBMessageStoreOperation,
- type RawMessageInfo,
} from 'lib/types/message-types';
import { defaultConnectionInfo } from 'lib/types/socket-types';
import { translateRawMessageInfoToClientDBMessageInfo } from 'lib/utils/message-ops-utils';
@@ -394,10 +393,7 @@
+currentAsOf: number,
+threads: { +[threadID: string]: PersistedThreadMessageInfo },
};
-type RehydratedMessageStore = $Diff<
- MessageStore,
- { +messages: { +[id: string]: RawMessageInfo } },
->;
+
const messageStoreMessagesBlocklistTransform: Transform = createTransform(
(state: MessageStore): PersistedMessageStore => {
const { messages, threads, ...messageStoreSansMessages } = state;
@@ -411,13 +407,13 @@
}
return { ...messageStoreSansMessages, threads: threadsToPersist };
},
- (state: PersistedMessageStore): RehydratedMessageStore => {
+ (state: PersistedMessageStore): MessageStore => {
const { threads: persistedThreads, ...messageStore } = state;
const threads = {};
for (const threadID in persistedThreads) {
threads[threadID] = { ...persistedThreads[threadID], messageIDs: [] };
}
- return { ...messageStore, threads };
+ return { ...messageStore, threads, messages: {} };
},
{ whitelist: ['messageStore'] },
);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 6:03 AM (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578633
Default Alt Text
D5545.id18196.diff (1 KB)

Event Timeline