Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3253607
D11928.id39939.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
D11928.id39939.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
@@ -1274,7 +1274,11 @@
};
},
[74]: (state: AppState) =>
- unshimClientDB(state, [messageTypes.UPDATE_RELATIONSHIP]),
+ unshimClientDB(
+ state,
+ [messageTypes.UPDATE_RELATIONSHIP],
+ handleReduxMigrationFailure,
+ ),
};
type PersistedReportStore = $Diff<
diff --git a/native/redux/unshim-utils.js b/native/redux/unshim-utils.js
--- a/native/redux/unshim-utils.js
+++ b/native/redux/unshim-utils.js
@@ -10,7 +10,6 @@
import type { RawMessageInfo } from 'lib/types/message-types.js';
import { translateClientDBMessageInfoToRawMessageInfo } from 'lib/utils/message-ops-utils.js';
-import { handleReduxMigrationFailure } from './handle-redux-migration-failure.js';
import type { AppState } from './state-types.js';
import { commCoreModule } from '../native-modules.js';
@@ -22,6 +21,7 @@
function unshimClientDB(
state: AppState,
unshimTypes: $ReadOnlyArray<MessageType>,
+ handleMigrationFailure?: AppState => AppState,
): AppState {
// 1. Get messages from SQLite `messages` table.
const clientDBMessageInfos = commCoreModule.getAllMessagesSync();
@@ -66,7 +66,10 @@
};
} catch (exception) {
console.log(exception);
- return handleReduxMigrationFailure(state);
+ if (handleMigrationFailure) {
+ return handleMigrationFailure(state);
+ }
+ return ({ ...state, cookie: null }: any);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 7:15 PM (17 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2500111
Default Alt Text
D11928.id39939.diff (1 KB)
Attached To
Mode
D11928: [native] Don't call handleReduxMigrationFailure for legacy migrations
Attached
Detach File
Event Timeline
Log In to Comment