diff --git a/src/components/RoomList.vue b/src/components/RoomList.vue index 8e01b44..1b8895c 100644 --- a/src/components/RoomList.vue +++ b/src/components/RoomList.vue @@ -90,7 +90,12 @@ export default { return this.sortItemsOnName(this.$matrix.invites); }, joinedRooms() { - return this.sortItemsOnName(this.$matrix.joinedRooms); + // show room with notification on top, followed by room decending order by active Timestamp + return [...this.$matrix.joinedRooms].sort((a, b) => { + if (this.notificationCount(a)) return -1; + if (this.notificationCount(b)) return 1; + return b.getLastActiveTimestamp() - a.getLastActiveTimestamp() + }); }, }, methods: {