New room list and chat header design
This commit is contained in:
parent
7396fbc959
commit
baf0120eee
23 changed files with 651 additions and 287 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue