mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Various fixes
This commit is contained in:
@@ -88,6 +88,7 @@ public final class TokenListTextField: Component {
|
||||
public let tokens: [Token]
|
||||
public let sideInset: CGFloat
|
||||
public let deleteToken: (AnyHashable) -> Void
|
||||
public let isFocusedUpdated: (Bool) -> Void
|
||||
|
||||
public init(
|
||||
externalState: ExternalState,
|
||||
@@ -96,7 +97,8 @@ public final class TokenListTextField: Component {
|
||||
placeholder: String,
|
||||
tokens: [Token],
|
||||
sideInset: CGFloat,
|
||||
deleteToken: @escaping (AnyHashable) -> Void
|
||||
deleteToken: @escaping (AnyHashable) -> Void,
|
||||
isFocusedUpdated: @escaping (Bool) -> Void = { _ in }
|
||||
) {
|
||||
self.externalState = externalState
|
||||
self.context = context
|
||||
@@ -105,6 +107,7 @@ public final class TokenListTextField: Component {
|
||||
self.tokens = tokens
|
||||
self.sideInset = sideInset
|
||||
self.deleteToken = deleteToken
|
||||
self.isFocusedUpdated = isFocusedUpdated
|
||||
}
|
||||
|
||||
public static func ==(lhs: TokenListTextField, rhs: TokenListTextField) -> Bool {
|
||||
@@ -191,6 +194,7 @@ public final class TokenListTextField: Component {
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
self.component?.isFocusedUpdated(self.tokenListNode?.isFocused ?? false)
|
||||
self.componentState?.updated(transition: Transition(animation: .curve(duration: 0.35, curve: .spring)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user