mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Various optimizations
This commit is contained in:
@@ -787,7 +787,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
if let strongSelf = self {
|
||||
strongSelf.scheduledContentAnimationHint = EmojiPagerContentComponent.ContentAnimation(type: .groupInstalled(id: collectionId, scrollToGroup: scrollToGroup))
|
||||
}
|
||||
let _ = context.engine.stickers.addStickerPackInteractively(info: featuredEmojiPack.info, items: featuredEmojiPack.topItems).start()
|
||||
let _ = context.engine.stickers.addStickerPackInteractively(info: featuredEmojiPack.info._parse(), items: featuredEmojiPack.topItems).start()
|
||||
|
||||
break
|
||||
}
|
||||
@@ -1300,7 +1300,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
if installed {
|
||||
return .complete()
|
||||
} else {
|
||||
return context.engine.stickers.addStickerPackInteractively(info: info, items: items)
|
||||
return context.engine.stickers.addStickerPackInteractively(info: info._parse(), items: items)
|
||||
}
|
||||
case .fetching:
|
||||
break
|
||||
|
||||
@@ -95,7 +95,7 @@ private enum StickerSearchEntry: Identifiable, Comparable {
|
||||
case let .global(_, info, topItems, installed, topSeparator):
|
||||
let itemContext = StickerPaneSearchGlobalItemContext()
|
||||
itemContext.canPlayMedia = true
|
||||
return StickerPaneSearchGlobalItem(context: context, theme: theme, strings: strings, listAppearance: false, info: info, topItems: topItems, topSeparator: topSeparator, regularInsets: false, installed: installed, unread: false, open: {
|
||||
return StickerPaneSearchGlobalItem(context: context, theme: theme, strings: strings, listAppearance: false, info: StickerPackCollectionInfo.Accessor(info), topItems: topItems, topSeparator: topSeparator, regularInsets: false, installed: installed, unread: false, open: {
|
||||
interaction.open(info)
|
||||
}, install: {
|
||||
interaction.install(info, topItems, !installed)
|
||||
@@ -255,10 +255,11 @@ final class StickerPaneSearchContentNode: ASDisplayNode, PaneSearchContentNode {
|
||||
|> mapToSignal { result -> Signal<(StickerPackCollectionInfo, [StickerPackItem]), NoError> in
|
||||
switch result {
|
||||
case let .result(info, items, installed):
|
||||
let info = info._parse()
|
||||
if installed {
|
||||
return .complete()
|
||||
} else {
|
||||
return preloadedStickerPackThumbnail(account: context.account, info: info, items: items)
|
||||
return preloadedStickerPackThumbnail(account: context.account, info: StickerPackCollectionInfo.Accessor(info), items: items)
|
||||
|> filter { $0 }
|
||||
|> ignoreValues
|
||||
|> then(
|
||||
|
||||
Reference in New Issue
Block a user