mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
refactored the ClientProxy to:
- throw an error during the init - to have its init directly instantiate the sync service and the providers Update ElementX/Sources/Services/UserSession/UserSessionStore.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> renamed
This commit is contained in:
@@ -127,9 +127,7 @@ class PinnedEventsTimelineFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
private func presentMessageForwarding(with forwardingItem: MessageForwardingItem) {
|
||||
guard let roomSummaryProvider = userSession.clientProxy.alternateRoomSummaryProvider else {
|
||||
fatalError()
|
||||
}
|
||||
let roomSummaryProvider = userSession.clientProxy.alternateRoomSummaryProvider
|
||||
|
||||
let stackCoordinator = NavigationStackCoordinator()
|
||||
|
||||
|
||||
@@ -696,7 +696,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
self.timelineController = timelineController
|
||||
|
||||
let completionSuggestionService = CompletionSuggestionService(roomProxy: roomProxy,
|
||||
roomListPublisher: userSession.clientProxy.staticRoomSummaryProvider?.roomListPublisher.eraseToAnyPublisher() ?? Empty().replaceEmpty(with: []).eraseToAnyPublisher())
|
||||
roomListPublisher: userSession.clientProxy.staticRoomSummaryProvider.roomListPublisher.eraseToAnyPublisher())
|
||||
let composerDraftService = ComposerDraftService(roomProxy: roomProxy, timelineItemfactory: timelineItemFactory)
|
||||
|
||||
let parameters = RoomScreenCoordinatorParameters(clientProxy: userSession.clientProxy,
|
||||
@@ -1295,9 +1295,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
private func presentMessageForwarding(with forwardingItem: MessageForwardingItem) {
|
||||
guard let roomSummaryProvider = userSession.clientProxy.alternateRoomSummaryProvider else {
|
||||
fatalError()
|
||||
}
|
||||
let roomSummaryProvider = userSession.clientProxy.alternateRoomSummaryProvider
|
||||
|
||||
let stackCoordinator = NavigationStackCoordinator()
|
||||
|
||||
|
||||
@@ -831,9 +831,7 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
// MARK: Global search
|
||||
|
||||
private func presentGlobalSearch() {
|
||||
guard let roomSummaryProvider = userSession.clientProxy.alternateRoomSummaryProvider else {
|
||||
fatalError("Global search room summary provider unavailable")
|
||||
}
|
||||
let roomSummaryProvider = userSession.clientProxy.alternateRoomSummaryProvider
|
||||
|
||||
let coordinator = GlobalSearchScreenCoordinator(parameters: .init(roomSummaryProvider: roomSummaryProvider,
|
||||
mediaProvider: userSession.mediaProvider))
|
||||
@@ -935,9 +933,7 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
// MARK: Sharing
|
||||
|
||||
private func presentRoomSelectionScreen(sharePayload: ShareExtensionPayload, animated: Bool) {
|
||||
guard let roomSummaryProvider = userSession.clientProxy.alternateRoomSummaryProvider else {
|
||||
fatalError()
|
||||
}
|
||||
let roomSummaryProvider = userSession.clientProxy.alternateRoomSummaryProvider
|
||||
|
||||
let stackCoordinator = NavigationStackCoordinator()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user