implementing static location sheet

This commit is contained in:
Mauro Romito
2026-03-06 12:53:39 +01:00
committed by Mauro
parent bbbb2e9dee
commit 9e68da4ff0
45 changed files with 447 additions and 258 deletions
@@ -85,9 +85,8 @@ class PinnedEventsTimelineFlowCoordinator: FlowCoordinatorProtocol {
actionsSubject.send(.finished)
case .displayUser(let userID):
actionsSubject.send(.displayUser(userID: userID))
case .presentLocationViewer(let senderID, let geoURI):
presentMapNavigator(senderID: senderID,
geoURI: geoURI,
case .presentLocationViewer(let location):
presentMapNavigator(location: location,
timelineController: timelineController)
case .displayMessageForwarding(let forwardingItem):
presentMessageForwarding(with: forwardingItem)
@@ -100,13 +99,11 @@ class PinnedEventsTimelineFlowCoordinator: FlowCoordinatorProtocol {
navigationStackCoordinator.setRootCoordinator(coordinator)
}
private func presentMapNavigator(senderID: String?,
geoURI: GeoURI,
private func presentMapNavigator(location: StaticLocationData,
timelineController: TimelineControllerProtocol) {
let stackCoordinator = NavigationStackCoordinator()
let params = LocationSharingScreenCoordinatorParameters(interactionMode: .viewStatic(senderID: senderID,
geoURI: geoURI),
let params = LocationSharingScreenCoordinatorParameters(interactionMode: .viewStatic(location),
mapURLBuilder: flowParameters.appSettings.mapTilerConfiguration,
liveLocationSharingEnabled: flowParameters.appSettings.liveLocationSharingEnabled,
roomProxy: roomProxy,
@@ -703,9 +703,10 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
case .presentPollForm(let mode):
stateMachine.tryEvent(.presentPollForm(mode: mode),
userInfo: EventUserInfo(animated: animated, timelineController: timelineController))
case .presentLocationViewer(let senderID, let geoURI):
stateMachine.tryEvent(.presentMapNavigator(interactionMode: .viewStatic(senderID: senderID, geoURI: geoURI)),
userInfo: EventUserInfo(animated: animated, timelineController: timelineController))
case .presentLocationViewer(let location):
stateMachine.tryEvent(.presentMapNavigator(interactionMode: .viewStatic(location)),
userInfo: EventUserInfo(animated: animated,
timelineController: timelineController))
case .presentRoomMemberDetails(userID: let userID):
stateMachine.tryEvent(.startMembersFlow(entryPoint: .roomMember(userID: userID)))
case .presentMessageForwarding(let forwardingItem):
@@ -788,9 +789,8 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
case .presentPollForm(let mode):
stateMachine.tryEvent(.presentPollForm(mode: mode),
userInfo: EventUserInfo(animated: animated, timelineController: timelineController))
case .presentLocationViewer(let senderID, let geoURI):
stateMachine.tryEvent(.presentMapNavigator(interactionMode: .viewStatic(senderID: senderID,
geoURI: geoURI)),
case .presentLocationViewer(let location):
stateMachine.tryEvent(.presentMapNavigator(interactionMode: .viewStatic(location)),
userInfo: EventUserInfo(animated: animated,
timelineController: timelineController))
case .presentEmojiPicker(let itemID, let selectedEmojis):