Merge branch '577-sort-room-list-by-more-recent-activity' into 'dev'
RoomList: sort by recent activity and room with notification See merge request keanuapp/keanuapp-weblite!277
This commit is contained in:
commit
9c3f791d52
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