1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Merge branches 'develop' and 't3chguy/toasts3_2' of github.com:matrix-org/matrix-react-sdk into t3chguy/toasts3_2

This commit is contained in:
Michael Telatynski
2020-05-27 09:45:38 +01:00
78 changed files with 2797 additions and 1590 deletions

View File

@@ -904,9 +904,20 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
});
}
private viewGroup(payload) {
private async viewGroup(payload) {
const groupId = payload.group_id;
// Wait for the first sync to complete
if (!this.firstSyncComplete) {
if (!this.firstSyncPromise) {
console.warn('Cannot view a group before first sync. group_id:', groupId);
return;
}
await this.firstSyncPromise.promise;
}
this.setState({
view: Views.LOGGED_IN,
currentGroupId: groupId,
currentGroupIsNew: payload.group_is_new,
});