mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Merge commit '3bacb78f084eda80c52a9245a94c980073fbcab8'
# Conflicts: # submodules/DebugSettingsUI/Sources/DebugController.swift
This commit is contained in:
@@ -638,12 +638,21 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
|
||||
}
|
||||
|
||||
if let starStatus = data.starStatus {
|
||||
actions.append(.action(ContextMenuActionItem(text: starStatus ? chatPresentationInterfaceState.strings.Stickers_RemoveFromFavorites : chatPresentationInterfaceState.strings.Stickers_AddToFavorites, icon: { theme in
|
||||
return generateTintedImage(image: starStatus ? UIImage(bundleImageName: "Chat/Context Menu/Unfave") : UIImage(bundleImageName: "Chat/Context Menu/Fave"), color: theme.actionSheet.primaryTextColor)
|
||||
}, action: { _, f in
|
||||
interfaceInteraction.toggleMessageStickerStarred(messages[0].id)
|
||||
f(.default)
|
||||
})))
|
||||
var isPremiumSticker = false
|
||||
for media in messages[0].media {
|
||||
if let file = media as? TelegramMediaFile, file.isPremiumSticker {
|
||||
isPremiumSticker = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !isPremiumSticker || chatPresentationInterfaceState.isPremium {
|
||||
actions.append(.action(ContextMenuActionItem(text: starStatus ? chatPresentationInterfaceState.strings.Stickers_RemoveFromFavorites : chatPresentationInterfaceState.strings.Stickers_AddToFavorites, icon: { theme in
|
||||
return generateTintedImage(image: starStatus ? UIImage(bundleImageName: "Chat/Context Menu/Unfave") : UIImage(bundleImageName: "Chat/Context Menu/Fave"), color: theme.actionSheet.primaryTextColor)
|
||||
}, action: { _, f in
|
||||
interfaceInteraction.toggleMessageStickerStarred(messages[0].id)
|
||||
f(.default)
|
||||
})))
|
||||
}
|
||||
}
|
||||
|
||||
if data.messageActions.options.contains(.rateCall) {
|
||||
|
||||
Reference in New Issue
Block a user