mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Refactor string generation
This commit is contained in:
@@ -297,7 +297,7 @@ private func themeAutoNightSettingsControllerEntries(theme: PresentationTheme, s
|
||||
|
||||
entries.append(.timeBasedAutomaticLocationValue(theme, strings.AutoNightTheme_UpdateLocation, localizedName))
|
||||
if sunset != 0 || sunrise != 0 {
|
||||
entries.append(.settingInfo(theme, strings.AutoNightTheme_LocationHelp(stringForMessageTimestamp(timestamp: sunset, dateTimeFormat: dateTimeFormat, local: false), stringForMessageTimestamp(timestamp: sunrise, dateTimeFormat: dateTimeFormat, local: false)).0))
|
||||
entries.append(.settingInfo(theme, strings.AutoNightTheme_LocationHelp(stringForMessageTimestamp(timestamp: sunset, dateTimeFormat: dateTimeFormat, local: false), stringForMessageTimestamp(timestamp: sunrise, dateTimeFormat: dateTimeFormat, local: false)).string))
|
||||
}
|
||||
case let .manual(fromSeconds, toSeconds):
|
||||
entries.append(.timeBasedManualFrom(theme, strings.AutoNightTheme_ScheduledFrom, stringForMessageTimestamp(timestamp: fromSeconds, dateTimeFormat: dateTimeFormat, local: false)))
|
||||
@@ -306,7 +306,7 @@ private func themeAutoNightSettingsControllerEntries(theme: PresentationTheme, s
|
||||
case let .brightness(threshold):
|
||||
entries.append(.settingsHeader(theme, strings.AutoNightTheme_AutomaticSection))
|
||||
entries.append(.brightnessValue(theme, threshold))
|
||||
entries.append(.settingInfo(theme, strings.AutoNightTheme_AutomaticHelp("\(Int(threshold * 100.0))").0.replacingOccurrences(of: "%%", with: "%")))
|
||||
entries.append(.settingInfo(theme, strings.AutoNightTheme_AutomaticHelp("\(Int(threshold * 100.0))").string.replacingOccurrences(of: "%%", with: "%")))
|
||||
}
|
||||
|
||||
switch switchSetting.trigger {
|
||||
|
||||
Reference in New Issue
Block a user