mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 17:42:45 +02:00
Add trigger to join and view room metrics events #5769
- Added trigger for JoinedRoom event - Tracking ViewRoom event for rooms and events
This commit is contained in:
+2
@@ -111,8 +111,10 @@ final class SpaceSettingsModalCoordinator: Coordinator {
|
||||
private func pushOptionScreen(ofType optionType: SpaceSettingsOptionType) {
|
||||
switch optionType {
|
||||
case .rooms:
|
||||
Analytics.shared.viewRoomTrigger = .spaceSettings
|
||||
exploreRooms(ofSpaceWithId: self.parameters.spaceId)
|
||||
case .members:
|
||||
Analytics.shared.viewRoomTrigger = .spaceSettings
|
||||
showMembers(ofSpaceWithId: self.parameters.spaceId)
|
||||
case .visibility:
|
||||
showAccess(ofSpaceWithId: self.parameters.spaceId)
|
||||
|
||||
+4
@@ -114,6 +114,10 @@ class SpaceSettingsService: SpaceSettingsServiceProtocol {
|
||||
userDefinedAddress = newValue
|
||||
}
|
||||
|
||||
func trackSpace() {
|
||||
Analytics.shared.exploringSpace = session.spaceService.getSpace(withId: spaceId)
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func readRoomState() {
|
||||
|
||||
+4
@@ -53,4 +53,8 @@ class MockSpaceSettingsService: SpaceSettingsServiceProtocol {
|
||||
func simulateUpdate(addressValidationStatus: SpaceCreationSettingsAddressValidationStatus) {
|
||||
self.addressValidationSubject.value = addressValidationStatus
|
||||
}
|
||||
|
||||
func trackSpace() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -34,6 +34,7 @@ protocol SpaceSettingsServiceProtocol: Avatarable {
|
||||
|
||||
func update(roomName: String, topic: String, address: String, avatar: UIImage?, completion: ((_ result: SpaceSettingsServiceCompletionResult) -> Void)?)
|
||||
func addressDidChange(_ newValue: String)
|
||||
func trackSpace()
|
||||
}
|
||||
|
||||
// MARK: Avatarable
|
||||
|
||||
@@ -120,4 +120,5 @@ enum SpaceSettingsViewAction {
|
||||
case pickImage(_ sourceRect: CGRect)
|
||||
case optionSelected(_ optionType: SpaceSettingsOptionType)
|
||||
case addressChanged(_ newValue: String)
|
||||
case trackSpace
|
||||
}
|
||||
|
||||
@@ -123,6 +123,8 @@ class SpaceSettingsViewModel: SpaceSettingsViewModelType, SpaceSettingsViewModel
|
||||
}
|
||||
case .addressChanged(let newValue):
|
||||
service.addressDidChange(newValue)
|
||||
case .trackSpace:
|
||||
service.trackSpace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,9 @@ struct SpaceSettings: View {
|
||||
}),
|
||||
secondaryButton: .cancel())
|
||||
})
|
||||
.onAppear {
|
||||
viewModel.send(viewAction: .trackSpace)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
Reference in New Issue
Block a user