mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Render LiveLocations in the map (#5394)
This commit is contained in:
@@ -86,7 +86,10 @@ class PinnedEventsTimelineFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case .displayUser(let userID):
|
||||
actionsSubject.send(.displayUser(userID: userID))
|
||||
case .presentLocationViewer(let location):
|
||||
presentMapNavigator(location: location,
|
||||
presentMapNavigator(interactionMode: .viewStatic(location),
|
||||
timelineController: timelineController)
|
||||
case .presentLiveLocationViewer(let sender, let initialLiveLocationShare):
|
||||
presentMapNavigator(interactionMode: .viewLive(sender: sender, initialLiveLocationShare: initialLiveLocationShare),
|
||||
timelineController: timelineController)
|
||||
case .displayMessageForwarding(let forwardingItem):
|
||||
presentMessageForwarding(with: forwardingItem)
|
||||
@@ -99,11 +102,11 @@ class PinnedEventsTimelineFlowCoordinator: FlowCoordinatorProtocol {
|
||||
navigationStackCoordinator.setRootCoordinator(coordinator)
|
||||
}
|
||||
|
||||
private func presentMapNavigator(location: StaticLocationData,
|
||||
private func presentMapNavigator(interactionMode: LocationSharingInteractionMode,
|
||||
timelineController: TimelineControllerProtocol) {
|
||||
let stackCoordinator = NavigationStackCoordinator()
|
||||
|
||||
let params = LocationSharingScreenCoordinatorParameters(interactionMode: .viewStatic(location),
|
||||
let params = LocationSharingScreenCoordinatorParameters(interactionMode: interactionMode,
|
||||
mapURLBuilder: flowParameters.appSettings.mapTilerConfiguration,
|
||||
liveLocationSharingEnabled: flowParameters.appSettings.liveLocationSharingEnabled,
|
||||
roomProxy: roomProxy,
|
||||
|
||||
@@ -712,6 +712,9 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
stateMachine.tryEvent(.presentMapNavigator(interactionMode: .viewStatic(location)),
|
||||
userInfo: EventUserInfo(animated: animated,
|
||||
timelineController: timelineController))
|
||||
case .presentLiveLocationViewer(let sender, let initialLiveLocationShare):
|
||||
stateMachine.tryEvent(.presentMapNavigator(interactionMode: .viewLive(sender: sender, initialLiveLocationShare: initialLiveLocationShare)),
|
||||
userInfo: EventUserInfo(animated: animated, timelineController: timelineController))
|
||||
case .presentRoomMemberDetails(userID: let userID):
|
||||
stateMachine.tryEvent(.startMembersFlow(entryPoint: .roomMember(userID: userID)))
|
||||
case .presentMessageForwarding(let forwardingItem):
|
||||
@@ -811,6 +814,9 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
case .presentLocationPicker:
|
||||
stateMachine.tryEvent(.presentMapNavigator(interactionMode: .picker),
|
||||
userInfo: EventUserInfo(animated: animated, timelineController: timelineController))
|
||||
case .presentLiveLocationViewer(let sender, let initialLiveLocationShare):
|
||||
stateMachine.tryEvent(.presentMapNavigator(interactionMode: .viewLive(sender: sender, initialLiveLocationShare: initialLiveLocationShare)),
|
||||
userInfo: EventUserInfo(animated: animated, timelineController: timelineController))
|
||||
case .presentPollForm(let mode):
|
||||
stateMachine.tryEvent(.presentPollForm(mode: mode),
|
||||
userInfo: EventUserInfo(animated: animated, timelineController: timelineController))
|
||||
|
||||
Reference in New Issue
Block a user