hydrogen-web/src/domain/session/room
Half-Shot 7b35a25627 Add option to allow disabling read receipts 2023-11-07 16:58:21 +00:00
..
timeline Move import to top of file 2023-06-09 13:42:21 +05:30
CallViewModel.ts fix mixing up params, causing us to call onUpdate on params rather than vm 2023-01-20 16:50:07 +01:00
ComposerViewModel.js always pass options to ViewModel constructor 2022-02-17 09:24:18 +01:00
InviteViewModel.js Rename urlRouter usage to urlRouter 2022-11-08 23:44:22 -06:00
LightboxViewModel.js Rename urlRouter usage to urlRouter 2022-11-08 23:44:22 -06:00
README.md WIP 2022-02-03 17:57:35 +01:00
RoomBeingCreatedViewModel.js Rename urlRouter usage to urlRouter 2022-11-08 23:44:22 -06:00
RoomViewModel.js Add option to allow disabling read receipts 2023-11-07 16:58:21 +00:00
UnknownRoomViewModel.js Add header to UnknownRoomView 2023-01-09 15:59:27 +00:00

README.md

"Room" view models

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

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, and a focus method. Once we convert this folder to typescript, we should use this interface for all the view models:

interface IGridItemViewModel {
    id: string;
    kind: string;
    focus();
}