Introduced all the necessary code for native ops for getting communities from the community store
Linear task: https://linear.app/comm/issue/ENG-6533/implement-c-code-to-get-communities
Depends on D11152
Paths
| Differential D11153 Authored by ginsu on Feb 23 2024, 12:29 AM.
Details Summary Introduced all the necessary code for native ops for getting communities from the community store Linear task: https://linear.app/comm/issue/ENG-6533/implement-c-code-to-get-communities Depends on D11152 Test Plan In a subsequent diff I will introduce logic to read communities from sqlite on app start and I was able to see that using the c++ code introduced in this diff I was able to get the communities into my redux store Also called the following code: const TEST_COMMUNITY_1: CommunityInfo = { enabledApps: { calendar: false, wiki: false, tasks: true, files: true, }, }; const TEST_COMMUNITY_2: CommunityInfo = { enabledApps: { calendar: true, wiki: false, tasks: false, files: false, }, }; let data = await commCoreModule.getClientDBStore(); console.log(data.communities); await commCoreModule.processCommunityStoreOperations([ { type: 'replace_community', payload: { id: '1', communityInfo: TEST_COMMUNITY_1, }, }, { type: 'replace_community', payload: { id: '2', communityInfo: TEST_COMMUNITY_2, }, }, ]); data = await commCoreModule.getClientDBStore(); console.log(data.communities); const community2Updated: CommunityInfo = { enabledApps: { calendar: true, wiki: true, tasks: true, files: true, }, }; await commCoreModule.processCommunityStoreOperations([ { type: 'replace_community', payload: { id: '2', communityInfo: community2Updated, }, }, ]); data = await commCoreModule.getClientDBStore(); console.log(data.communities); await commCoreModule.processCommunityStoreOperations([ { type: 'remove_communities', payload: { ids: ['1'], }, }, ]); data = await commCoreModule.getClientDBStore(); console.log(data.communities); await commCoreModule.processCommunityStoreOperations([ { type: 'remove_all_communities', }, ]); data = await commCoreModule.getClientDBStore(); console.log(data.communities);
Diff Detail
Event TimelineHerald added subscribers: tomek, ashoat. · View Herald TranscriptFeb 23 2024, 12:29 AM2024-02-23 00:29:46 (UTC-8) ginsu edited the summary of this revision. (Show Details)Feb 23 2024, 12:37 AM2024-02-23 00:37:26 (UTC-8) Harbormaster returned this revision to the author for changes because remote builds failed.Feb 23 2024, 12:42 AM2024-02-23 00:42:23 (UTC-8) Harbormaster completed remote builds in B27087: Diff 37479.Feb 23 2024, 12:44 AM2024-02-23 00:44:29 (UTC-8) This revision is now accepted and ready to land.Feb 23 2024, 6:30 AM2024-02-23 06:30:09 (UTC-8) Harbormaster completed remote builds in B27089: Diff 37481.Feb 26 2024, 1:50 PM2024-02-26 13:50:36 (UTC-8) ginsu edited the test plan for this revision. (Show Details)Feb 27 2024, 7:35 PM2024-02-27 19:35:08 (UTC-8) Comment Actions
updated test plan Harbormaster failed remote builds in B27217: Diff 37670!Feb 27 2024, 7:43 PM2024-02-27 19:43:02 (UTC-8) Harbormaster completed remote builds in B27216: Diff 37669.Feb 27 2024, 7:53 PM2024-02-27 19:53:17 (UTC-8) This revision was landed with ongoing or failed builds.Feb 27 2024, 8:02 PM2024-02-27 20:02:30 (UTC-8) Closed by commit rCOMMb1f35f4bd8e6: [sqlite] implement c++ code to get communities (authored by ginsu). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 37676 lib/types/store-ops-types.js
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
native/cpp/CommonCpp/NativeModules/PersistentStorageUtilities/DataStores/CommunityStore.cpp
web/database/worker/process-operations.js
|