Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3358760
D5545.id18196.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5545.id18196.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5545: Introduce messages field in MessageStore during rehydration
Attached
Detach File
Event Timeline
Log In to Comment