mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various improvements
This commit is contained in:
@@ -186,7 +186,8 @@ private func quickReactionSetupControllerEntries(
|
||||
availableReactions: AvailableReactions?,
|
||||
images: [String: (image: UIImage, isAnimation: Bool)],
|
||||
reactionSettings: ReactionSettings,
|
||||
state: QuickReactionSetupControllerState
|
||||
state: QuickReactionSetupControllerState,
|
||||
isPremium: Bool
|
||||
) -> [QuickReactionSetupControllerEntry] {
|
||||
var entries: [QuickReactionSetupControllerEntry] = []
|
||||
|
||||
@@ -210,6 +211,10 @@ private func quickReactionSetupControllerEntries(
|
||||
continue
|
||||
}
|
||||
|
||||
if !isPremium && availableReaction.isPremium {
|
||||
continue
|
||||
}
|
||||
|
||||
entries.append(.item(
|
||||
index: index,
|
||||
value: availableReaction.value,
|
||||
@@ -332,10 +337,12 @@ public func quickReactionSetupController(
|
||||
statePromise.get(),
|
||||
context.engine.stickers.availableReactions(),
|
||||
settings,
|
||||
images
|
||||
images,
|
||||
context.engine.data.get(TelegramEngine.EngineData.Item.Peer.Peer(id: context.account.peerId))
|
||||
)
|
||||
|> deliverOnMainQueue
|
||||
|> map { presentationData, state, availableReactions, settings, images -> (ItemListControllerState, (ItemListNodeState, Any)) in
|
||||
|> map { presentationData, state, availableReactions, settings, images, accountPeer -> (ItemListControllerState, (ItemListNodeState, Any)) in
|
||||
let isPremium = accountPeer?.isPremium ?? false
|
||||
let title: String = presentationData.strings.Settings_QuickReactionSetup_Title
|
||||
|
||||
let entries = quickReactionSetupControllerEntries(
|
||||
@@ -343,7 +350,8 @@ public func quickReactionSetupController(
|
||||
availableReactions: availableReactions,
|
||||
images: images,
|
||||
reactionSettings: settings,
|
||||
state: state
|
||||
state: state,
|
||||
isPremium: isPremium
|
||||
)
|
||||
|
||||
let controllerState = ItemListControllerState(
|
||||
|
||||
Reference in New Issue
Block a user