Page MenuHomePhabricator

D5545.id18249.diff
No OneTemporary

D5545.id18249.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
Thu, Nov 28, 11:42 PM (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594937
Default Alt Text
D5545.id18249.diff (1 KB)

Event Timeline