Render state items in the timeline and as the last message on the home screen. (#473)

* State events in the timeline WIP
* Implement membership change strings.
* Add other state event types and use in RoomSummaryProvider.

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
This commit is contained in:
Doug
2023-01-20 13:37:39 +00:00
committed by GitHub
parent 5b0a42ad0f
commit f05fa630c1
32 changed files with 536 additions and 75 deletions
@@ -213,7 +213,7 @@ struct HomeScreen_Previews: PreviewProvider {
}
static func body(_ state: MockRoomSummaryProviderState) -> some View {
let userSession = MockUserSession(clientProxy: MockClientProxy(userIdentifier: "John Doe",
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "John Doe",
roomSummaryProvider: MockRoomSummaryProvider(state: state)),
mediaProvider: MockMediaProvider())
@@ -121,7 +121,7 @@ struct HomeScreenRoomCell_Previews: PreviewProvider {
static var body: some View {
let summaryProvider = MockRoomSummaryProvider(state: .loaded)
let userSession = MockUserSession(clientProxy: MockClientProxy(userIdentifier: "John Doe", roomSummaryProvider: summaryProvider),
let userSession = MockUserSession(clientProxy: MockClientProxy(userID: "John Doe", roomSummaryProvider: summaryProvider),
mediaProvider: MockMediaProvider())
let viewModel = HomeScreenViewModel(userSession: userSession,