[iOS] fix isolines stats

This commit is contained in:
Aleksey Belousov 2020-02-21 14:52:53 +03:00 committed by Aleksandr Zatsepin
parent ebe7d5afb8
commit e480764945

View file

@ -109,9 +109,23 @@ extension LayersViewController: MapOverlayManagerObserver {
func onIsoLinesStateUpdated() {
updateIsoLinesButton()
if MapOverlayManager.isoLinesEnabled() {
let status: String?
switch MapOverlayManager.isolinesState() {
case .enabled:
status = "success"
case .expiredData:
status = "error"
case .noData:
status = "unavailable"
case .disabled:
status = nil
@unknown default:
fatalError()
}
if let status = status {
Statistics.logEvent("Map_Layers_activate", withParameters: ["name" : "isolines",
"status" : "success"])
"status" : status])
}
}
}