mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-09 19:56:44 +01:00
add roomDescription property
This commit is contained in:
parent
b6573258fb
commit
f902f255a4
@ -33,6 +33,7 @@ export class InviteViewModel extends ViewModel {
|
|||||||
if (this._invite.inviter) {
|
if (this._invite.inviter) {
|
||||||
this._inviter = new RoomMemberViewModel(this._invite.inviter, mediaRepository, this.platform);
|
this._inviter = new RoomMemberViewModel(this._invite.inviter, mediaRepository, this.platform);
|
||||||
}
|
}
|
||||||
|
this._roomDescription = this._createRoomDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
get kind() { return "invite"; }
|
get kind() { return "invite"; }
|
||||||
@ -67,6 +68,24 @@ export class InviteViewModel extends ViewModel {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_createRoomDescription() {
|
||||||
|
const parts = [];
|
||||||
|
if (this._invite.isPublic) {
|
||||||
|
parts.push("Public room");
|
||||||
|
} else {
|
||||||
|
parts.push("Private room");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._invite.canonicalAlias) {
|
||||||
|
parts.push(this._invite.canonicalAlias);
|
||||||
|
}
|
||||||
|
return parts.join(" • ")
|
||||||
|
}
|
||||||
|
|
||||||
|
get roomDescription() {
|
||||||
|
return this._roomDescription;
|
||||||
|
}
|
||||||
|
|
||||||
get avatarTitle() {
|
get avatarTitle() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user