[FIX] Show Join button in threads that belongs to a room not joined (#4836)

* [FIX] Show Join button in threads belong to a room not joined

* update the state on the main room if you join from thread
This commit is contained in:
Reinaldo Neto 2023-03-16 12:49:18 -03:00 committed by GitHub
parent 00b8263913
commit e08c611a9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -515,7 +515,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
if (data[0]) {
if (this.subObserveQuery && this.subObserveQuery.unsubscribe) {
this.observeRoom(data[0]);
this.setState({ room: data[0] });
this.setState({ room: data[0], joined: true });
this.subObserveQuery.unsubscribe();
}
}
@ -1440,7 +1440,7 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
</View>
);
}
if (!joined && !this.tmid) {
if (!joined) {
return (
<View style={styles.joinRoomContainer} key='room-view-join' testID='room-view-join'>
<Text