From 501416e17ae3584e3ec2fbc173e7628197aa77fa Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 27 Feb 2026 16:49:29 +0400 Subject: [PATCH] Various fixes --- Telegram/Telegram-iOS/en.lproj/Localizable.strings | 1 + .../Sources/ChatParticipantRightsScreen.swift | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 768bf4ed1e..da5461a4eb 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -15861,6 +15861,7 @@ Error: %8$@"; "Chat.EnableSharingOffer.RejectConfirmation.Reject" = "Keep Disabled"; "Chat.TagUpdated.Added" = "Tag added"; +"Chat.TagUpdated.Edited" = "Tag edited"; "Chat.TagUpdated.Removed" = "Tag removed"; "Conversation.FormatDate.Title" = "Date"; diff --git a/submodules/TelegramUI/Components/ChatParticipantRightsScreen/Sources/ChatParticipantRightsScreen.swift b/submodules/TelegramUI/Components/ChatParticipantRightsScreen/Sources/ChatParticipantRightsScreen.swift index b11b52b71c..6bbc4ad256 100644 --- a/submodules/TelegramUI/Components/ChatParticipantRightsScreen/Sources/ChatParticipantRightsScreen.swift +++ b/submodules/TelegramUI/Components/ChatParticipantRightsScreen/Sources/ChatParticipantRightsScreen.swift @@ -518,15 +518,18 @@ public class ChatParticipantRightsScreen: ViewControllerComponentContainer { let presentationData = self.context.sharedContext.currentPresentationData.with { $0 } if let navigationController = self.navigationController as? NavigationController { Queue.mainQueue().after(0.5) { + var hadRank = false + if case let .rank(_, _, rank, _) = self.subject, !(rank ?? "").isEmpty { + hadRank = true + } + var title: String? var text: String? if let rank { - title = presentationData.strings.Chat_TagUpdated_Added + title = hadRank ? presentationData.strings.Chat_TagUpdated_Edited : presentationData.strings.Chat_TagUpdated_Added text = rank - } else { - if case let .rank(_, _, rank, _) = self.subject, !(rank ?? "").isEmpty { - text = presentationData.strings.Chat_TagUpdated_Removed - } + } else if hadRank { + text = presentationData.strings.Chat_TagUpdated_Removed } if let text { let toastController = UndoOverlayController(presentationData: presentationData, content: .actionSucceeded(title: title, text: text, cancel: nil, destructive: false), appearance: .init(isNarrow: true), action: { _ in return true})