mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
friends don't read each others private properties
This commit is contained in:
parent
46b24c3f24
commit
f6d9ffa7bb
@ -50,7 +50,7 @@ export class SessionViewModel extends ViewModel {
|
|||||||
|
|
||||||
get selectionId() {
|
get selectionId() {
|
||||||
if (this._currentRoomViewModel) {
|
if (this._currentRoomViewModel) {
|
||||||
return this._currentRoomViewModel._room.id;
|
return this._currentRoomViewModel.id;
|
||||||
} else if (this._gridViewModel) {
|
} else if (this._gridViewModel) {
|
||||||
return "roomgrid";
|
return "roomgrid";
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ export class SessionViewModel extends ViewModel {
|
|||||||
_openRoom(room, roomTileVM) {
|
_openRoom(room, roomTileVM) {
|
||||||
if (this._gridViewModel?.tryFocusRoom(room.id)) {
|
if (this._gridViewModel?.tryFocusRoom(room.id)) {
|
||||||
return;
|
return;
|
||||||
} else if (this._currentRoomViewModel?._room.id === room.id) {
|
} else if (this._currentRoomViewModel?.id === room.id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const roomVM = new RoomViewModel(this.childOptions({
|
const roomVM = new RoomViewModel(this.childOptions({
|
||||||
|
@ -98,6 +98,10 @@ export class RoomViewModel extends ViewModel {
|
|||||||
return this._room.name || this.i18n`Empty Room`;
|
return this._room.name || this.i18n`Empty Room`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get id() {
|
||||||
|
return this._room.id;
|
||||||
|
}
|
||||||
|
|
||||||
get timelineViewModel() {
|
get timelineViewModel() {
|
||||||
return this._timelineVM;
|
return this._timelineVM;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user