Refactor string generation

This commit is contained in:
Ali
2021-07-20 11:57:50 +02:00
parent bbd096d88b
commit 7bed1728bb
205 changed files with 15848 additions and 33988 deletions

View File

@@ -98,7 +98,7 @@ private enum ConfirmPhoneNumberCodeEntry: ItemListNodeEntry {
let formattedNumber = formatPhoneNumber(phoneNumber)
let stringAndRanges = strings.CancelResetAccount_TextSMS(formattedNumber)
var result = ""
result += stringAndRanges.0
result += stringAndRanges.string
if let range = result.range(of: formattedNumber) {
result.insert("*", at: range.upperBound)
result.insert("*", at: range.upperBound)
@@ -269,7 +269,7 @@ public func confirmPhoneNumberCodeController(context: AccountContext, phoneNumbe
return state
}
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.CancelResetAccount_Success(formatPhoneNumber(phoneNumber)).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.CancelResetAccount_Success(formatPhoneNumber(phoneNumber)).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), nil)
dismissImpl?()
}))
}