From ce541d0f80d3817885cfe2cb7d0f4868b1e39708 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 29 Oct 2020 01:20:02 +0400 Subject: [PATCH] Fix distance formatting --- .../LocationUI/Sources/LocationDistancePickerScreen.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/LocationUI/Sources/LocationDistancePickerScreen.swift b/submodules/LocationUI/Sources/LocationDistancePickerScreen.swift index 14ea90a87d..1b69b09936 100644 --- a/submodules/LocationUI/Sources/LocationDistancePickerScreen.swift +++ b/submodules/LocationUI/Sources/LocationDistancePickerScreen.swift @@ -377,8 +377,8 @@ class LocationDistancePickerScreenNode: ViewControllerTracingNode, UIScrollViewD } var formattedValue = String(format: "%0.1f", CGFloat(value) / 1000.0) - if value == 50 { - formattedValue = formattedValue.replacingOccurrences(of: ".1", with: "0.05") + if smallValue == 5 { + formattedValue = formattedValue.replacingOccurrences(of: ".1", with: ".05").replacingOccurrences(of: ",1", with: ",05") } let distance = self.usesMetricSystem ? "\(formattedValue) \(self.presentationData.strings.Location_ProximityNotification_DistanceKM)" : "\(formattedValue) \(self.presentationData.strings.Location_ProximityNotification_DistanceMI)"