Merge commit '3bacb78f084eda80c52a9245a94c980073fbcab8'

# Conflicts:
#	submodules/DebugSettingsUI/Sources/DebugController.swift
This commit is contained in:
Ali
2022-06-08 00:39:58 +04:00
35 changed files with 720 additions and 429 deletions

View File

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