mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
fix viewGroup to actually show the group if possible
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
37d04d6ceb
commit
c372e8edee
1 changed files with 12 additions and 1 deletions
|
@ -932,9 +932,20 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private viewGroup(payload) {
|
private async viewGroup(payload) {
|
||||||
const groupId = payload.group_id;
|
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({
|
this.setState({
|
||||||
|
view: Views.LOGGED_IN,
|
||||||
currentGroupId: groupId,
|
currentGroupId: groupId,
|
||||||
currentGroupIsNew: payload.group_is_new,
|
currentGroupIsNew: payload.group_is_new,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue