mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Local audio transcription experiment and UI fixes
This commit is contained in:
@@ -17,11 +17,16 @@ private func findTaggedViewImpl(view: UIView, tag: Any) -> UIView? {
|
||||
return nil
|
||||
}
|
||||
|
||||
public final class ComponentHostViewSkipSettingFrame {
|
||||
public init() {
|
||||
}
|
||||
}
|
||||
|
||||
public final class ComponentHostView<EnvironmentType>: UIView {
|
||||
private var currentComponent: AnyComponent<EnvironmentType>?
|
||||
private var currentContainerSize: CGSize?
|
||||
private var currentSize: CGSize?
|
||||
private var componentView: UIView?
|
||||
public private(set) var componentView: UIView?
|
||||
private(set) var isUpdating: Bool = false
|
||||
|
||||
public init() {
|
||||
@@ -89,7 +94,9 @@ public final class ComponentHostView<EnvironmentType>: UIView {
|
||||
}
|
||||
|
||||
let updatedSize = component._update(view: componentView, availableSize: containerSize, environment: context.erasedEnvironment, transition: transition)
|
||||
transition.setFrame(view: componentView, frame: CGRect(origin: CGPoint(), size: updatedSize))
|
||||
if transition.userData(ComponentHostViewSkipSettingFrame.self) == nil {
|
||||
transition.setFrame(view: componentView, frame: CGRect(origin: CGPoint(), size: updatedSize))
|
||||
}
|
||||
|
||||
self.isUpdating = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user