From d32babde082b6dc7f647bbe752d14a1a499d78ac Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Thu, 22 Aug 2024 17:10:59 +0200 Subject: [PATCH] fixing a possible crash --- .../PinnedEventsTimelineScreenCoordinator.swift | 3 ++- .../Sources/Screens/RoomScreen/RoomScreenCoordinator.swift | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ElementX/Sources/Screens/PinnedEventsTimelineScreen/PinnedEventsTimelineScreenCoordinator.swift b/ElementX/Sources/Screens/PinnedEventsTimelineScreen/PinnedEventsTimelineScreenCoordinator.swift index fdc9daef7f..3257d82974 100644 --- a/ElementX/Sources/Screens/PinnedEventsTimelineScreen/PinnedEventsTimelineScreenCoordinator.swift +++ b/ElementX/Sources/Screens/PinnedEventsTimelineScreen/PinnedEventsTimelineScreenCoordinator.swift @@ -89,7 +89,8 @@ final class PinnedEventsTimelineScreenCoordinator: CoordinatorProtocol { actionsSubject.send(.displayRoomScreenWithFocussedPin(eventID: eventID)) // These other actions will not be handled in this view case .displayEmojiPicker, .displayReportContent, .displayCameraPicker, .displayMediaPicker, .displayDocumentPicker, .displayLocationPicker, .displayPollForm, .displayMediaUploadPreviewScreen, .composer, .hasScrolled: - fatalError("The action: \(action) should not be handled in this coordinator") + // These actions are not handled in this coordinator + break } } .store(in: &cancellables) diff --git a/ElementX/Sources/Screens/RoomScreen/RoomScreenCoordinator.swift b/ElementX/Sources/Screens/RoomScreen/RoomScreenCoordinator.swift index 6f6435da78..c08229f62f 100644 --- a/ElementX/Sources/Screens/RoomScreen/RoomScreenCoordinator.swift +++ b/ElementX/Sources/Screens/RoomScreen/RoomScreenCoordinator.swift @@ -141,7 +141,7 @@ final class RoomScreenCoordinator: CoordinatorProtocol { case .hasScrolled(direction: let direction): roomViewModel.timelineHasScrolled(direction: direction) case .viewInRoomTimeline: - fatalError("The action: \(action) should not be handled in this coordinator") + fatalError("The action: \(action) should not be sent to this coordinator") } } .store(in: &cancellables)