mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Entities keyboard for story replies
This commit is contained in:
@@ -148,19 +148,25 @@ public final class GifPagerContentComponent: Component {
|
||||
public let loadMore: (String) -> Void
|
||||
public let openSearch: () -> Void
|
||||
public let updateSearchQuery: ([String]?) -> Void
|
||||
public let hideBackground: Bool
|
||||
public let hasSearch: Bool
|
||||
|
||||
public init(
|
||||
performItemAction: @escaping (Item, UIView, CGRect) -> Void,
|
||||
openGifContextMenu: @escaping (Item, UIView, CGRect, ContextGesture, Bool) -> Void,
|
||||
loadMore: @escaping (String) -> Void,
|
||||
openSearch: @escaping () -> Void,
|
||||
updateSearchQuery: @escaping ([String]?) -> Void
|
||||
updateSearchQuery: @escaping ([String]?) -> Void,
|
||||
hideBackground: Bool,
|
||||
hasSearch: Bool
|
||||
) {
|
||||
self.performItemAction = performItemAction
|
||||
self.openGifContextMenu = openGifContextMenu
|
||||
self.loadMore = loadMore
|
||||
self.openSearch = openSearch
|
||||
self.updateSearchQuery = updateSearchQuery
|
||||
self.hideBackground = hideBackground
|
||||
self.hasSearch = hasSearch
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +204,7 @@ public final class GifPagerContentComponent: Component {
|
||||
public let searchCategories: EmojiSearchCategories?
|
||||
public let searchInitiallyHidden: Bool
|
||||
public let searchState: EmojiPagerContentComponent.SearchState
|
||||
public let hideBackground: Bool
|
||||
|
||||
public init(
|
||||
context: AccountContext,
|
||||
@@ -209,7 +216,8 @@ public final class GifPagerContentComponent: Component {
|
||||
displaySearchWithPlaceholder: String?,
|
||||
searchCategories: EmojiSearchCategories?,
|
||||
searchInitiallyHidden: Bool,
|
||||
searchState: EmojiPagerContentComponent.SearchState
|
||||
searchState: EmojiPagerContentComponent.SearchState,
|
||||
hideBackground: Bool
|
||||
) {
|
||||
self.context = context
|
||||
self.inputInteraction = inputInteraction
|
||||
@@ -221,6 +229,7 @@ public final class GifPagerContentComponent: Component {
|
||||
self.searchCategories = searchCategories
|
||||
self.searchInitiallyHidden = searchInitiallyHidden
|
||||
self.searchState = searchState
|
||||
self.hideBackground = hideBackground
|
||||
}
|
||||
|
||||
public static func ==(lhs: GifPagerContentComponent, rhs: GifPagerContentComponent) -> Bool {
|
||||
@@ -254,6 +263,9 @@ public final class GifPagerContentComponent: Component {
|
||||
if lhs.searchState != rhs.searchState {
|
||||
return false
|
||||
}
|
||||
if lhs.hideBackground != rhs.hideBackground {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -1103,6 +1115,8 @@ public final class GifPagerContentComponent: Component {
|
||||
transition.setPosition(view: self.scrollClippingView, position: clippingFrame.center)
|
||||
transition.setBounds(view: self.scrollClippingView, bounds: clippingFrame)
|
||||
|
||||
self.backgroundView.isHidden = component.hideBackground
|
||||
|
||||
return availableSize
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user