mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Make sure we pass the via parameters with all the routes.
Put the event ID first. Fix tests. Bump the SDK.
This commit is contained in:
+6
-3
@@ -24,7 +24,8 @@ struct RoomDirectorySearchScreenCoordinatorParameters {
|
||||
}
|
||||
|
||||
enum RoomDirectorySearchScreenCoordinatorAction {
|
||||
case select(roomID: String)
|
||||
case selectAlias(String)
|
||||
case selectRoomID(String)
|
||||
case dismiss
|
||||
}
|
||||
|
||||
@@ -48,8 +49,10 @@ final class RoomDirectorySearchScreenCoordinator: CoordinatorProtocol {
|
||||
viewModel.actionsPublisher.sink { [weak self] action in
|
||||
guard let self else { return }
|
||||
switch action {
|
||||
case .select(let roomID):
|
||||
actionsSubject.send(.select(roomID: roomID))
|
||||
case .selectAlias(let alias):
|
||||
actionsSubject.send(.selectAlias(alias))
|
||||
case .selectRoomID(let roomID):
|
||||
actionsSubject.send(.selectRoomID(roomID))
|
||||
case .dismiss:
|
||||
actionsSubject.send(.dismiss)
|
||||
}
|
||||
|
||||
+3
-2
@@ -17,7 +17,8 @@
|
||||
import Foundation
|
||||
|
||||
enum RoomDirectorySearchScreenViewModelAction {
|
||||
case select(roomID: String)
|
||||
case selectAlias(String)
|
||||
case selectRoomID(String)
|
||||
case dismiss
|
||||
}
|
||||
|
||||
@@ -35,6 +36,6 @@ struct RoomDirectorySearchScreenViewStateBindings {
|
||||
|
||||
enum RoomDirectorySearchScreenViewAction {
|
||||
case dismiss
|
||||
case select(roomID: String)
|
||||
case select(room: RoomDirectorySearchResult)
|
||||
case reachedBottom
|
||||
}
|
||||
|
||||
+6
-2
@@ -65,8 +65,12 @@ class RoomDirectorySearchScreenViewModel: RoomDirectorySearchScreenViewModelType
|
||||
switch viewAction {
|
||||
case .dismiss:
|
||||
actionsSubject.send(.dismiss)
|
||||
case .select(roomID: let roomID):
|
||||
actionsSubject.send(.select(roomID: roomID))
|
||||
case .select(let room):
|
||||
if let alias = room.alias {
|
||||
actionsSubject.send(.selectAlias(alias))
|
||||
} else {
|
||||
actionsSubject.send(.selectRoomID(room.id))
|
||||
}
|
||||
case .reachedBottom:
|
||||
loadNextPage()
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ struct RoomDirectorySearchScreen: View {
|
||||
Section {
|
||||
ForEach(context.viewState.rooms) { room in
|
||||
RoomDirectorySearchCell(result: room, imageProvider: context.imageProvider) {
|
||||
context.send(viewAction: .select(roomID: room.id))
|
||||
context.send(viewAction: .select(room: room))
|
||||
}
|
||||
}
|
||||
} footer: {
|
||||
|
||||
Reference in New Issue
Block a user