mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Refactor string generation
This commit is contained in:
@@ -122,7 +122,7 @@ private enum LocationViewEntry: Comparable, Identifiable {
|
||||
}
|
||||
let distanceString: String?
|
||||
if let distance = distance {
|
||||
distanceString = distance < 10 ? presentationData.strings.Map_YouAreHere : presentationData.strings.Map_DistanceAway(stringForDistance(strings: presentationData.strings, distance: distance)).0
|
||||
distanceString = distance < 10 ? presentationData.strings.Map_YouAreHere : presentationData.strings.Map_DistanceAway(stringForDistance(strings: presentationData.strings, distance: distance)).string
|
||||
} else {
|
||||
distanceString = nil
|
||||
}
|
||||
@@ -235,7 +235,7 @@ final class LocationViewControllerNode: ViewControllerTracingNode, CLLocationMan
|
||||
self.listNode.verticalScrollIndicatorColor = UIColor(white: 0.0, alpha: 0.3)
|
||||
self.listNode.verticalScrollIndicatorFollowsOverscroll = true
|
||||
self.listNode.accessibilityPageScrolledString = { row, count in
|
||||
return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
|
||||
return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
|
||||
}
|
||||
|
||||
var setupProximityNotificationImpl: ((Bool) -> Void)?
|
||||
@@ -721,7 +721,7 @@ final class LocationViewControllerNode: ViewControllerTracingNode, CLLocationMan
|
||||
|
||||
var text: String = strongSelf.presentationData.strings.Location_ProximityGroupTip
|
||||
if peer.id.namespace == Namespaces.Peer.CloudUser {
|
||||
text = strongSelf.presentationData.strings.Location_ProximityTip(peer.compactDisplayTitle).0
|
||||
text = strongSelf.presentationData.strings.Location_ProximityTip(peer.compactDisplayTitle).string
|
||||
}
|
||||
|
||||
strongSelf.interaction.present(TooltipScreen(text: text, icon: nil, location: .point(location.offsetBy(dx: -9.0, dy: 0.0), .right), displayDuration: .custom(3.0), shouldDismissOnTouch: { _ in
|
||||
|
||||
Reference in New Issue
Block a user