mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Add location related analytics (#1241)
* Refactor trackComposer method * Track location screen * Refactor isPinDropSharing -> isSharingUserLocation * Add trackComposer event * Fix UTs * Cleanup * Add AnalyticsLocationType
This commit is contained in:
@@ -511,15 +511,21 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
coordinator.actions.sink { [weak self] action in
|
||||
guard let self else { return }
|
||||
switch action {
|
||||
case .selectedLocation(let geoURI):
|
||||
case .selectedLocation(let geoURI, let isUserLocation):
|
||||
Task {
|
||||
_ = await self.roomProxy?.sendLocation(body: geoURI.bodyMessage,
|
||||
geoURI: geoURI,
|
||||
description: nil,
|
||||
zoomLevel: nil,
|
||||
assetType: .pin)
|
||||
assetType: isUserLocation ? .sender : .pin)
|
||||
self.navigationSplitCoordinator.setSheetCoordinator(nil)
|
||||
}
|
||||
|
||||
self.analytics.trackComposer(inThread: false,
|
||||
isEditing: false,
|
||||
isReply: false,
|
||||
locationType: isUserLocation ? .myLocation : .pin,
|
||||
startsThread: nil)
|
||||
case .close:
|
||||
self.navigationSplitCoordinator.setSheetCoordinator(nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user