Fix change team and channel in iOS share extension (#1727)
This commit is contained in:
parent
37484f104b
commit
43cf9b5294
1 changed files with 22 additions and 1 deletions
|
|
@ -151,7 +151,28 @@ export default function configureAppStore(initialState) {
|
|||
store.subscribe(throttle(() => {
|
||||
const state = store.getState();
|
||||
if (state.entities) {
|
||||
mattermostBucket.writeToFile('entities', JSON.stringify(state.entities), Config.AppGroupId);
|
||||
const channelsInTeam = {...state.entities.channels.channelsInTeam};
|
||||
Object.keys(channelsInTeam).forEach((teamId) => {
|
||||
channelsInTeam[teamId] = Array.from(channelsInTeam[teamId]);
|
||||
});
|
||||
|
||||
const profilesInChannel = {...state.entities.users.profilesInChannel};
|
||||
Object.keys(profilesInChannel).forEach((channelId) => {
|
||||
profilesInChannel[channelId] = Array.from(profilesInChannel[channelId]);
|
||||
});
|
||||
|
||||
const entities = {
|
||||
...state.entities,
|
||||
channels: {
|
||||
...state.entities.channels,
|
||||
channelsInTeam,
|
||||
},
|
||||
users: {
|
||||
...state.entities.users,
|
||||
profilesInChannel,
|
||||
},
|
||||
};
|
||||
mattermostBucket.writeToFile('entities', JSON.stringify(entities), Config.AppGroupId);
|
||||
}
|
||||
}, 1000));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue