mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Use a static room summary provider to resolve room summaries through id and aliases (#3863)
* trying to debug why sometimes the value is missing even if it appears in the room list * static room provider implementation * set the page size through the init * removed reset filters on .cancel since using the sop function is safer
This commit is contained in:
@@ -45,6 +45,10 @@ final class RoomSelectionScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
func stop() {
|
||||
viewModel.stop()
|
||||
}
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(RoomSelectionScreen(context: viewModel.context))
|
||||
|
||||
@@ -54,7 +54,6 @@ class RoomSelectionScreenViewModel: RoomSelectionScreenViewModelType, RoomSelect
|
||||
switch viewAction {
|
||||
case .cancel:
|
||||
actionsSubject.send(.dismiss)
|
||||
roomSummaryProvider.setFilter(.all(filters: []))
|
||||
case .confirm:
|
||||
guard let selectedRoomID = state.selectedRoomID else {
|
||||
return
|
||||
@@ -70,6 +69,11 @@ class RoomSelectionScreenViewModel: RoomSelectionScreenViewModelType, RoomSelect
|
||||
}
|
||||
}
|
||||
|
||||
func stop() {
|
||||
// This is a shared provider so we should reset the filtering when we are done with the view
|
||||
roomSummaryProvider.setFilter(.all(filters: []))
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func updateRooms() {
|
||||
|
||||
+2
@@ -11,4 +11,6 @@ import Combine
|
||||
protocol RoomSelectionScreenViewModelProtocol {
|
||||
var actionsPublisher: AnyPublisher<RoomSelectionScreenViewModelAction, Never> { get }
|
||||
var context: RoomSelectionScreenViewModelType.Context { get }
|
||||
|
||||
func stop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user