vector-im-hydrogen-web/src/domain/session/room
Bruno Windels 5445db2a42 allow injecting the tilesCreator from the Root/Session/RoomViewModel
this changes the API slightly to be more future-proof,
as we'll expose it in the SDK now.

The function now returns a SimpleTile constructor, rather than an
instance. This allows us to test if an entry would render in the
timeline without creating a tile, which is something we might want in
the matrix layer later on.

The function is now called tileClassForEntry, analogue to what we
do in TimelineView.
2022-04-08 12:52:30 +02:00
..
timeline allow injecting the tilesCreator from the Root/Session/RoomViewModel 2022-04-08 12:52:30 +02:00
ComposerViewModel.js always pass options to ViewModel constructor 2022-02-17 09:24:18 +01:00
InviteViewModel.js typescriptify domain/avatar.js 2022-02-25 15:52:54 +05:30
LightboxViewModel.js rename imports 2022-02-14 17:53:59 +01:00
README.md WIP 2022-02-03 17:57:35 +01:00
RoomBeingCreatedViewModel.js typescriptify domain/avatar.js 2022-02-25 15:52:54 +05:30
RoomViewModel.js allow injecting the tilesCreator from the Root/Session/RoomViewModel 2022-04-08 12:52:30 +02:00
UnknownRoomViewModel.js rename imports 2022-02-14 17:53:59 +01:00

"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();
}