Address comments, show unencrypted rooms,

retain viewModel and services in ScreenSates so you can interact with Previews after the first state.
This commit is contained in:
David Langley
2021-09-23 23:57:54 +01:00
parent bd4d9974a8
commit d560e513d4
16 changed files with 185 additions and 114 deletions
@@ -42,7 +42,7 @@ enum MockTemplateUserProfileScreenState: MockScreenState, CaseIterable {
}
/// Generate the view struct for the screen state.
var screenView: AnyView {
var screenView: ([Any], AnyView) {
let service: MockTemplateUserProfileService
switch self {
case .presence(let presence):
@@ -54,7 +54,10 @@ enum MockTemplateUserProfileScreenState: MockScreenState, CaseIterable {
// can simulate service and viewModel actions here if needs be.
return AnyView(TemplateUserProfile(viewModel: viewModel.context)
return (
[service, viewModel],
AnyView(TemplateUserProfile(viewModel: viewModel.context)
.addDependency(MockAvatarService.example))
)
}
}