hydrogen-web/src/domain/session/room
2021-04-27 14:42:12 +02:00
..
timeline Add previous name in name change announcement 2021-03-19 23:28:50 +05:30
InviteViewModel.js always show inviter if present 2021-04-27 14:42:12 +02:00
LightboxViewModel.js implement first draft of image lightbox 2020-10-30 15:20:11 +01:00
README.md first draft of InviteViewModel 2021-04-21 15:45:51 +02:00
RoomViewModel.js refresh vm when left room receives invite 2021-04-23 18:06:38 +02:00

"Room" view models

InviteViewModel and RoomViewModel are interchangebly used as "room view model": - SessionViewModel.roomViewModel can be an instance of either - RoomGridViewModel.roomViewModelAt(i) can return an instance of either

This is because they are accessed by the same url and need to transition into each other, in these two locations. Having two methods, especially in RoomGridViewModel would have been more cumbersome, even though this is not in line with how different view models are exposed in SessionViewModel.

They share an id and kind property, the latter can be used to differentiate them from the view.