Page MenuHomePhorge

D12789.1765106495.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D12789.1765106495.diff

diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -103,7 +103,9 @@
ClientDBThreadInfo,
LegacyRawThreadInfo,
MixedRawThreadInfos,
+ RawThreadInfos,
} from 'lib/types/thread-types.js';
+import { stripMemberPermissionsFromRawThreadInfos } from 'lib/utils/member-info-utils.js';
import {
translateClientDBMessageInfoToRawMessageInfo,
translateRawMessageInfoToClientDBMessageInfo,
@@ -1414,6 +1416,26 @@
ops: [],
};
},
+ [80]: (state: AppState) => {
+ const clientDBThreadInfos = commCoreModule.getAllThreadsSync();
+
+ // This isn't actually accurate, but we force this cast here because the
+ // types for createUpdateDBOpsForThreadStoreThreadInfos assume they're
+ // converting from a client DB that contains RawThreadInfos. In fact, at
+ // this point the client DB contains ThinRawThreadInfoWithPermissions.
+ const stripMemberPermissions: RawThreadInfos => RawThreadInfos =
+ (stripMemberPermissionsFromRawThreadInfos: any);
+
+ const dbOperations = createUpdateDBOpsForThreadStoreThreadInfos(
+ clientDBThreadInfos,
+ stripMemberPermissions,
+ );
+
+ return {
+ state,
+ ops: dbOperations,
+ };
+ },
};
// NOTE: renaming this object, and especially the `version` property

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 11:21 AM (18 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5841867
Default Alt Text
D12789.1765106495.diff (1 KB)

Event Timeline