Merge commit 'a4bf4b7a3b71269c9a321aa1d0cc5f9c1502d110'

This commit is contained in:
Ali 2023-10-29 23:06:57 +04:00
commit e8d94de9ce
4 changed files with 9 additions and 3 deletions

View File

@ -10419,3 +10419,5 @@ Sorry for the inconvenience.";
"Settings.New" = "NEW";
"ChannelBoost.Or" = "or";
"Channel.ChannelColor" = "Channel Color";

View File

@ -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()

View File

@ -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)

View File

@ -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()
}))
}