Various improvements

This commit is contained in:
Isaac
2025-06-29 18:15:50 +02:00
parent b2909a3241
commit 3ed857bfc3
34 changed files with 399 additions and 370 deletions

View File

@@ -1816,23 +1816,22 @@ extension ChatControllerImpl {
guard let self else {
return
}
//TODO:localize
let titleString: String
let textString: String
switch attribute.currency {
case .stars:
titleString = "Stars Will Be Lost"
textString = "You won't receive **Stars** for this post if you delete it now. The post must remain visible for at least **24 hours** after publication."
titleString = self.presentationData.strings.Chat_DeletePaidMessageStars_Title
textString = self.presentationData.strings.Chat_DeletePaidMessageStars_Text
case .ton:
titleString = "TON Will Be Lost"
textString = "You won't receive **TON** for this post if you delete it now. The post must remain visible for at least **24 hours** after publication."
titleString = self.presentationData.strings.Chat_DeletePaidMessageTon_Title
textString = self.presentationData.strings.Chat_DeletePaidMessageTon_Text
}
self.present(standardTextAlertController(
theme: AlertControllerTheme(presentationData: self.presentationData),
title: titleString,
text: textString,
actions: [
TextAlertAction(type: .destructiveAction, title: "Delete Anyway", action: { [weak self] in
TextAlertAction(type: .destructiveAction, title: self.presentationData.strings.Chat_DeletePaidMessage_Action, action: { [weak self] in
guard let self else {
return
}