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
{F1214250}
{F1214249}
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);
```