Check Application state before sending RR (#1960)

* check the state

* better handling

* protocol to mock the application state

* test improvement
This commit is contained in:
Mauro
2023-10-25 19:16:37 +02:00
committed by GitHub
parent af76be2426
commit d457736673
14 changed files with 235 additions and 106 deletions
@@ -61,7 +61,8 @@ struct RoomHeaderView_Previews: PreviewProvider, TestablePreview {
roomProxy: RoomProxyMock(with: .init(displayName: "Some Room name", avatarURL: URL.picturesDirectory)),
appSettings: ServiceLocator.shared.settings,
analytics: ServiceLocator.shared.analytics,
userIndicatorController: ServiceLocator.shared.userIndicatorController)
userIndicatorController: ServiceLocator.shared.userIndicatorController,
application: ApplicationMock.default)
RoomHeaderView(context: viewModel.context)
.previewLayout(.sizeThatFits)
@@ -76,7 +77,8 @@ struct RoomHeaderView_Previews: PreviewProvider, TestablePreview {
roomProxy: RoomProxyMock(with: .init(displayName: "Some Room name")),
appSettings: ServiceLocator.shared.settings,
analytics: ServiceLocator.shared.analytics,
userIndicatorController: ServiceLocator.shared.userIndicatorController)
userIndicatorController: ServiceLocator.shared.userIndicatorController,
application: ApplicationMock.default)
RoomHeaderView(context: viewModel.context)
.previewLayout(.sizeThatFits)