Local audio transcription experiment and UI fixes

This commit is contained in:
Ali
2022-05-17 23:21:11 +04:00
parent f6190e347d
commit 54788f60de
27 changed files with 892 additions and 183 deletions

View File

@@ -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