If you only have 1 room, go directly to the group details.
This commit is contained in:
parent
f2f630083a
commit
9e79bb5fd1
1 changed files with 15 additions and 1 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<div class="chat-root fill-height d-flex flex-column" ma-0 pa-0>
|
||||
<ChatHeader
|
||||
class="chat-header flex-grow-0 flex-shrink-0"
|
||||
v-on:header-click="$refs.roomInfoSheet.open()"
|
||||
v-on:header-click="onHeaderClick"
|
||||
/>
|
||||
<div
|
||||
class="chat-content flex-grow-1 flex-shrink-1"
|
||||
|
|
@ -1704,6 +1704,20 @@ export default {
|
|||
formatBytes(bytes) {
|
||||
return prettyBytes(bytes);
|
||||
},
|
||||
|
||||
onHeaderClick() {
|
||||
const joinedRooms = this.$matrix.joinedRooms;
|
||||
if (
|
||||
joinedRooms &&
|
||||
joinedRooms.length == 1 &&
|
||||
joinedRooms[0].roomId == this.room.roomId
|
||||
) {
|
||||
// Only joined to this room, go directly to room details!
|
||||
this.$navigation.push({ name: "RoomInfo" });
|
||||
return;
|
||||
}
|
||||
this.$refs.roomInfoSheet.open();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue