From 731042084be403a0762cccee9b8e0f56fe897c46 Mon Sep 17 00:00:00 2001 From: N-Pex Date: Thu, 11 Mar 2021 14:20:05 +0100 Subject: [PATCH] Clean up room info to use new roomInfoMixin --- src/components/RoomInfo.vue | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/components/RoomInfo.vue b/src/components/RoomInfo.vue index 5f3fe50..69823bd 100644 --- a/src/components/RoomInfo.vue +++ b/src/components/RoomInfo.vue @@ -126,9 +126,11 @@ import LeaveRoomDialog from "../components/LeaveRoomDialog"; import DeviceList from "../components/DeviceList"; import QRCode from "qrcode"; +import roomInfoMixin from "./roomInfoMixin"; export default { name: "RoomInfo", + mixins: [roomInfoMixin], components: { LeaveRoomDialog, DeviceList @@ -164,10 +166,6 @@ export default { }, computed: { - room() { - return this.$matrix.currentRoom; - }, - creator() { if (this.room) { const createEvent = this.room.currentState.getStateEvents("m.room.create", ""); @@ -185,20 +183,6 @@ export default { return ""; }, - roomName() { - if (this.room) { - return this.room.name; - } - return ""; - }, - - roomTopic() { - if (this.room) { - return this.room.topic; - } - return ""; - }, - anyoneCanJoin() { // TODO: fix this! For now, just return true of we have a canonical alias. if (this.room && this.room.getCanonicalAlias() && this.room.getCanonicalAlias().startsWith('#')) { @@ -214,13 +198,6 @@ export default { return null; }, - roomAvatar() { - if (this.room) { - return this.room.avatar; - } - return ""; - }, - joinedMembers() { if (!this.room) { return [];