Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin 2024-08-13 13:16:49 +02:00
commit a4b5b9d30f
2 changed files with 13 additions and 2 deletions

View File

@ -1402,6 +1402,9 @@ public class PeerAllowedReactionsScreen: ViewControllerComponentContainer {
case .empty:
isEnabled = false
}
if let starsAllowed = reactionSettings.starsAllowed, starsAllowed {
isEnabled = true
}
}
var missingReactionFiles: [Int64] = []

View File

@ -1993,9 +1993,17 @@ private func editingItems(data: PeerInfoScreenData?, state: PeerInfoState, chatL
case .all:
label = presentationData.strings.PeerInfo_LabelAllReactions
case .empty:
label = presentationData.strings.PeerInfo_ReactionsDisabled
if let starsAllowed = reactionSettings.starsAllowed, starsAllowed {
label = "1"
} else {
label = presentationData.strings.PeerInfo_ReactionsDisabled
}
case let .limited(reactions):
label = "\(reactions.count)"
var countValue = reactions.count
if let starsAllowed = reactionSettings.starsAllowed, starsAllowed {
countValue += 1
}
label = "\(countValue)"
}
} else {
label = ""