diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 13fe96953c..5c9c484fb4 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -10419,3 +10419,5 @@ Sorry for the inconvenience."; "Settings.New" = "NEW"; "ChannelBoost.Or" = "or"; + +"Channel.ChannelColor" = "Channel Color"; diff --git a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ApplyColorFooterItem.swift b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ApplyColorFooterItem.swift index 23e2352130..cfbe13f5c4 100644 --- a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ApplyColorFooterItem.swift +++ b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ApplyColorFooterItem.swift @@ -93,7 +93,7 @@ final class ApplyColorFooterItemNode: ItemListControllerFooterItemNode { } if self.inProgress != self.item.inProgress { - self.inProgress = true + self.inProgress = self.item.inProgress if self.item.inProgress { self.buttonNode.transitionToProgress() diff --git a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/PeerNameColorScreen.swift b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/PeerNameColorScreen.swift index 5e7b0a62ba..1229720f9d 100644 --- a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/PeerNameColorScreen.swift +++ b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/PeerNameColorScreen.swift @@ -589,9 +589,13 @@ public func PeerNameColorScreen( return } let state = stateValue.with { $0 } + if state.updatedNameColor == nil && state.updatedBackgroundEmojiId == nil { + dismissImpl?() + return + } let presentationData = context.sharedContext.currentPresentationData.with { $0 } - + let nameColor = state.updatedNameColor ?? peer.nameColor let backgroundEmojiId = state.updatedBackgroundEmojiId ?? peer.backgroundEmojiId let colors = context.peerNameColors.get(nameColor ?? .blue, dark: presentationData.theme.overallDarkAppearance) diff --git a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift index 9415878664..308b3c76e3 100644 --- a/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift +++ b/submodules/TelegramUI/Sources/PeerInfo/PeerInfoScreen.swift @@ -1621,7 +1621,7 @@ private func editingItems(data: PeerInfoScreenData?, state: PeerInfoState, chatL if isCreator || (channel.adminRights?.rights.contains(.canChangeInfo) == true) { let colors = context.peerNameColors.get(data.peer?.nameColor ?? .blue, dark: presentationData.theme.overallDarkAppearance) - items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemNameColor, label: .semitransparentBadge(EnginePeer(channel).compactDisplayTitle, colors.main), text: "Channel Color", icon: UIImage(bundleImageName: "Chat/Info/NameColorIcon"), action: { + items[.peerSettings]!.append(PeerInfoScreenDisclosureItem(id: ItemNameColor, label: .semitransparentBadge(EnginePeer(channel).compactDisplayTitle, colors.main), text: presentationData.strings.Channel_ChannelColor, icon: UIImage(bundleImageName: "Chat/Info/NameColorIcon"), action: { interaction.editingOpenNameColorSetup() })) }