Various improvements

This commit is contained in:
Ilya Laktyushin
2022-05-22 01:05:56 +04:00
parent 1dde73148a
commit b0396c8d15
10 changed files with 68 additions and 19 deletions

View File

@@ -12,6 +12,7 @@ import AccountContext
import StickerPackPreviewUI
import ContextUI
import ChatPresentationInterfaceState
import PremiumUI
final class HorizontalStickersChatContextPanelInteraction {
var previewedStickerItem: StickerPackItem?
@@ -220,8 +221,12 @@ final class HorizontalStickersChatContextPanelNode: ChatInputContextPanelNode {
}
}))
]
return (itemNode, StickerPreviewPeekContent(account: strongSelf.context.account, theme: strongSelf.theme, strings: strongSelf.strings, item: .pack(item), menu: menuItems, openPremiumIntro: {
return (itemNode, StickerPreviewPeekContent(account: strongSelf.context.account, theme: strongSelf.theme, strings: strongSelf.strings, item: .pack(item), menu: menuItems, openPremiumIntro: { [weak self] in
guard let strongSelf = self else {
return
}
let controller = PremiumIntroScreen(context: strongSelf.context, source: .stickers)
strongSelf.controllerInteraction?.navigationController()?.pushViewController(controller)
}))
} else {
return nil