Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3359023
D11669.id39302.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
D11669.id39302.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
@@ -1219,6 +1219,36 @@
return newState;
},
+ [70]: (state: any) => {
+ const clientDBMessageInfos = commCoreModule.getAllMessagesSync();
+ const unsupportedMessageIDsToRemove = clientDBMessageInfos
+ .filter(
+ message =>
+ parseInt(message.type) === messageTypes.UNSUPPORTED &&
+ parseInt(message.future_type) === messageTypes.UPDATE_RELATIONSHIP,
+ )
+ .map(message => message.id);
+
+ const messageStoreOperations: $ReadOnlyArray<ClientDBMessageStoreOperation> =
+ [
+ {
+ type: 'remove',
+ payload: { ids: unsupportedMessageIDsToRemove },
+ },
+ ];
+
+ try {
+ commCoreModule.processMessageStoreOperationsSync(messageStoreOperations);
+ } catch (exception) {
+ console.log(exception);
+ if (isTaskCancelledError(exception)) {
+ return state;
+ }
+ return { ...state, cookie: null };
+ }
+
+ return state;
+ },
};
type PersistedReportStore = $Diff<
@@ -1240,7 +1270,7 @@
storage: AsyncStorage,
blacklist: persistBlacklist,
debug: __DEV__,
- version: 69,
+ version: 70,
transforms: [
messageStoreMessagesBlocklistTransform,
reportStoreTransform,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 6:46 AM (21 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578360
Default Alt Text
D11669.id39302.diff (1 KB)
Attached To
Mode
D11669: [native] Redux migration to clear `UNSUPPORTED<UPDATE_RELATIONSHIP>` messages
Attached
Detach File
Event Timeline
Log In to Comment