New room list and chat header design

This commit is contained in:
N Pex 2023-03-03 14:43:53 +00:00
parent 7396fbc959
commit baf0120eee
23 changed files with 651 additions and 287 deletions

View file

@ -799,6 +799,20 @@ export default {
return false;
},
/**
* Return true if this room is a direct room with one other user. NOTE: this currently
* only checks number of members, not any is_direct flag.
* @param { } room
*/
isDirectRoom(room) {
// TODO - Use the is_direct accountData flag (m.direct). WE (as the client)
// apprently need to set this...
if (room.getJoinRule() == "invite" && room.getMembers().length == 2) {
return true;
}
return false;
},
on(event, handler) {
if (this.matrixClient) {
this.matrixClient.on(event, handler);