Roomllist: sorty by recent activity and room with notification
This commit is contained in:
parent
63810b0208
commit
d1dde1baf4
1 changed files with 6 additions and 1 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue