Locally built some buttons + actions for each method and confirmed that when I triggered the actions the client db communites table was correctly being modified
For reference, here is the local code with the callbacks that dispatch the actions to my community reducer (The community reducer will be introduced in subsequent diff)
```
const dispatch = useDispatch();
const fakeCommunityID = '256|84261';
const onPressAddCommunity = React.useCallback(() => {
const communityInfoTEST_COMMUNITY_1: CommunityInfo = {
enabledApps: {
calendar: truefalse,
wiki: false,
tasks: true,
files: true,
},
};
dispatch({const TEST_COMMUNITY_2: CommunityInfo = {
type: addCommunityActionType,enabledApps: {
payload: { calendar: true,
wiki: false,
id: fakeCommunityIDtasks: false,
newCommunityInfo: communityInfofiles: false,
},
});
}, [dispatch]);
const onPressRemoveCommunity = React.useCallback(() => {
dispatch({await commCoreModule.processCommunityStoreOperations([
{
type: 'replace_community',
payload: {
id: '1',
communityInfo: TEST_COMMUNITY_1,
},
type: removeCommunityActionType},
{
type: 'replace_community',
payload: {
id: '2',
communityInfo: TEST_COMMUNITY_2,
id: fakeCommunityID},
},
});]);
const community2Updated: CommunityInfo = {
enabledApps: {
calendar: true,
wiki: true,
tasks: true,
files: true,
}, [dispatch]);
};
const onPressRemoveAllCommunities = React.useCallback(() => { await commCoreModule.processCommunityStoreOperations([
{
type: 'replace_community',
payload: {
id: '2',
communityInfo: community2Updated,
},
},
dispatch({]);
await commCoreModule.processCommunityStoreOperations([
{
type: 'remove_communities',
payload: {
ids: ['1'],
},
type: removeAllCommunitesActionType},
});]);
await commCoreModule.processCommunityStoreOperations([
{
type: 'remove_all_communities',
}, [dispatch]);
]);
```