mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Stories
This commit is contained in:
@@ -304,6 +304,20 @@ public final class ChatTextInputPanelComponent: Component {
|
||||
panelNode.ensureFocused()
|
||||
}
|
||||
|
||||
public func deactivateInput() {
|
||||
guard let panelNode = self.panelNode else {
|
||||
return
|
||||
}
|
||||
panelNode.ensureUnfocused()
|
||||
}
|
||||
|
||||
public var isActive: Bool {
|
||||
guard let panelNode = self.panelNode else {
|
||||
return false
|
||||
}
|
||||
return panelNode.isFocused
|
||||
}
|
||||
|
||||
public func updateState(transition: ComponentTransition) {
|
||||
self.state?.updated(transition: transition)
|
||||
}
|
||||
|
||||
@@ -220,8 +220,10 @@ final class StarReactionButtonComponent: Component {
|
||||
case .ended:
|
||||
if let gesture = recogizer.lastRecognizedGestureAndLocation?.0 {
|
||||
if case .tap = gesture {
|
||||
HapticFeedback().tap()
|
||||
component.action(self)
|
||||
} else if case .longTap = gesture {
|
||||
HapticFeedback().impact(.medium)
|
||||
component.longPressAction?(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user