Page MenuHomePhabricator

D11928.id39909.diff
No OneTemporary

D11928.id39909.diff

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

Mime Type
text/plain
Expires
Sat, Sep 28, 7:18 PM (20 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2197746
Default Alt Text
D11928.id39909.diff (1 KB)

Event Timeline