mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Dismiss room invite notifications when rejecting them from the home screen. (#4074)
This commit is contained in:
@@ -155,38 +155,39 @@ struct HomeScreenInviteCell_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
VStack(spacing: 0) {
|
||||
HomeScreenInviteCell(room: .dmInvite,
|
||||
context: viewModel().context, hideInviteAvatars: false)
|
||||
context: makeViewModel().context, hideInviteAvatars: false)
|
||||
|
||||
HomeScreenInviteCell(room: .dmInvite,
|
||||
context: viewModel().context, hideInviteAvatars: false)
|
||||
context: makeViewModel().context, hideInviteAvatars: false)
|
||||
|
||||
HomeScreenInviteCell(room: .roomInvite(),
|
||||
context: viewModel().context, hideInviteAvatars: false)
|
||||
context: makeViewModel().context, hideInviteAvatars: false)
|
||||
|
||||
HomeScreenInviteCell(room: .roomInvite(),
|
||||
context: viewModel().context, hideInviteAvatars: false)
|
||||
context: makeViewModel().context, hideInviteAvatars: false)
|
||||
|
||||
HomeScreenInviteCell(room: .roomInvite(alias: "#footest:somewhere.org", avatarURL: .mockMXCAvatar),
|
||||
context: viewModel().context, hideInviteAvatars: false)
|
||||
context: makeViewModel().context, hideInviteAvatars: false)
|
||||
HomeScreenInviteCell(room: .roomInvite(alias: "#footest-hidden-avatars:somewhere.org", avatarURL: .mockMXCAvatar),
|
||||
context: viewModel().context, hideInviteAvatars: true)
|
||||
context: makeViewModel().context, hideInviteAvatars: true)
|
||||
HomeScreenInviteCell(room: .roomInvite(alias: "#footest:somewhere.org"),
|
||||
context: viewModel().context, hideInviteAvatars: false)
|
||||
context: makeViewModel().context, hideInviteAvatars: false)
|
||||
.dynamicTypeSize(.accessibility1)
|
||||
.previewDisplayName("Aliased room (AX1)")
|
||||
}
|
||||
.previewLayout(.sizeThatFits)
|
||||
}
|
||||
|
||||
static func viewModel() -> HomeScreenViewModel {
|
||||
static func makeViewModel() -> HomeScreenViewModel {
|
||||
let clientProxy = ClientProxyMock(.init())
|
||||
|
||||
let userSession = UserSessionMock(.init(clientProxy: clientProxy))
|
||||
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
analyticsService: ServiceLocator.shared.analytics,
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
analyticsService: ServiceLocator.shared.analytics,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user