mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Refactoring
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import AccountContext
|
||||
import ChatPresentationInterfaceState
|
||||
|
||||
public protocol ChatInputPanelViewForOverlayContent: UIView {
|
||||
func maybeDismissContent(point: CGPoint)
|
||||
}
|
||||
|
||||
open class ChatInputPanelNode: ASDisplayNode {
|
||||
open var context: AccountContext?
|
||||
open var interfaceInteraction: ChatPanelInterfaceInteraction?
|
||||
open var prevInputPanelNode: ChatInputPanelNode?
|
||||
|
||||
open var viewForOverlayContent: ChatInputPanelViewForOverlayContent?
|
||||
|
||||
open func updateAbsoluteRect(_ rect: CGRect, within containerSize: CGSize, transition: ContainedViewLayoutTransition) {
|
||||
}
|
||||
|
||||
open func updateLayout(width: CGFloat, leftInset: CGFloat, rightInset: CGFloat, bottomInset: CGFloat, additionalSideInsets: UIEdgeInsets, maxHeight: CGFloat, isSecondary: Bool, transition: ContainedViewLayoutTransition, interfaceState: ChatPresentationInterfaceState, metrics: LayoutMetrics, isMediaInputExpanded: Bool) -> CGFloat {
|
||||
return 0.0
|
||||
}
|
||||
|
||||
open func minimalHeight(interfaceState: ChatPresentationInterfaceState, metrics: LayoutMetrics) -> CGFloat {
|
||||
return 0.0
|
||||
}
|
||||
|
||||
open func defaultHeight(metrics: LayoutMetrics) -> CGFloat {
|
||||
if case .regular = metrics.widthClass, case .regular = metrics.heightClass {
|
||||
return 49.0
|
||||
} else {
|
||||
return 45.0
|
||||
}
|
||||
}
|
||||
|
||||
open func canHandleTransition(from prevInputPanelNode: ChatInputPanelNode?) -> Bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user