If you only have 1 room, go directly to the group details.

This commit is contained in:
N-Pex 2021-07-18 12:17:15 +02:00
parent f2f630083a
commit 9e79bb5fd1

View file

@ -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>