mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add emoji search result cache
This commit is contained in:
@@ -103,7 +103,7 @@ final class EmojiSearchSearchBarComponent: Component {
|
||||
let useOpaqueTheme: Bool
|
||||
let textInputState: TextInputState
|
||||
let categories: EmojiSearchCategories?
|
||||
let searchTermUpdated: (String?) -> Void
|
||||
let searchTermUpdated: ([String]?) -> Void
|
||||
let activateTextInput: () -> Void
|
||||
|
||||
init(
|
||||
@@ -113,7 +113,7 @@ final class EmojiSearchSearchBarComponent: Component {
|
||||
useOpaqueTheme: Bool,
|
||||
textInputState: TextInputState,
|
||||
categories: EmojiSearchCategories?,
|
||||
searchTermUpdated: @escaping (String?) -> Void,
|
||||
searchTermUpdated: @escaping ([String]?) -> Void,
|
||||
activateTextInput: @escaping () -> Void
|
||||
) {
|
||||
self.context = context
|
||||
@@ -360,7 +360,7 @@ final class EmojiSearchSearchBarComponent: Component {
|
||||
self.componentState?.updated(transition: .easeInOut(duration: 0.2))
|
||||
|
||||
if let _ = self.selectedItem, let categories = component.categories, let group = categories.groups.first(where: { $0.id == itemId }) {
|
||||
component.searchTermUpdated(group.identifiers.joined(separator: ""))
|
||||
component.searchTermUpdated(group.identifiers)
|
||||
|
||||
if let itemComponentView = itemView.view.view {
|
||||
var offset = self.scrollView.contentOffset.x
|
||||
|
||||
Reference in New Issue
Block a user