mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
implemented navigation for permalinks to threads
also this handles the case where we are permalinking to non existent (or impossible to fetch) event.
This commit is contained in:
@@ -13,6 +13,7 @@ import WysiwygComposer
|
||||
struct ThreadTimelineScreenCoordinatorParameters {
|
||||
let userSession: UserSessionProtocol
|
||||
let roomProxy: JoinedRoomProxyProtocol
|
||||
let focussedEventID: String?
|
||||
let timelineController: TimelineControllerProtocol
|
||||
let mediaPlayerProvider: MediaPlayerProviderProtocol
|
||||
let emojiProvider: EmojiProviderProtocol
|
||||
@@ -58,6 +59,7 @@ final class ThreadTimelineScreenCoordinator: CoordinatorProtocol {
|
||||
viewModel = ThreadTimelineScreenViewModel(roomProxy: parameters.roomProxy, userSession: parameters.userSession)
|
||||
|
||||
timelineViewModel = TimelineViewModel(roomProxy: parameters.roomProxy,
|
||||
focussedEventID: parameters.focussedEventID,
|
||||
timelineController: parameters.timelineController,
|
||||
userSession: parameters.userSession,
|
||||
mediaPlayerProvider: parameters.mediaPlayerProvider,
|
||||
@@ -155,4 +157,8 @@ final class ThreadTimelineScreenCoordinator: CoordinatorProtocol {
|
||||
timelineContext: timelineViewModel.context,
|
||||
composerToolbar: composerToolbar))
|
||||
}
|
||||
|
||||
func focusOnEvent(eventID: String) {
|
||||
Task { await timelineViewModel.focusOnEvent(eventID: eventID) }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user