Refactoring

This commit is contained in:
Isaac
2024-06-12 23:04:04 +04:00
parent 1b1846dc63
commit 9a075fa39e
360 changed files with 1830 additions and 1713 deletions

View File

@@ -1046,7 +1046,7 @@ final class SectionGroupComponent: Component {
}
}
func update(component: SectionGroupComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: Transition) -> CGSize {
func update(component: SectionGroupComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: ComponentTransition) -> CGSize {
let sideInset: CGFloat = 16.0
self.backgroundColor = component.backgroundColor
@@ -1153,7 +1153,7 @@ final class SectionGroupComponent: Component {
return View(frame: CGRect())
}
public func update(view: View, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: Transition) -> CGSize {
public func update(view: View, availableSize: CGSize, state: EmptyComponentState, environment: Environment<Empty>, transition: ComponentTransition) -> CGSize {
return view.update(component: self, availableSize: availableSize, state: state, environment: environment, transition: transition)
}
}
@@ -3594,7 +3594,7 @@ private final class PremiumIntroScreenComponent: CombinedComponent {
context.add(bottomPanel
.position(CGPoint(x: context.availableSize.width / 2.0, y: context.availableSize.height - bottomPanel.size.height / 2.0))
.opacity(bottomPanelAlpha)
.disappear(Transition.Disappear { view, transition, completion in
.disappear(ComponentTransition.Disappear { view, transition, completion in
if case .none = transition.animation {
completion()
return
@@ -3607,7 +3607,7 @@ private final class PremiumIntroScreenComponent: CombinedComponent {
context.add(bottomSeparator
.position(CGPoint(x: context.availableSize.width / 2.0, y: context.availableSize.height - bottomPanel.size.height))
.opacity(bottomPanelAlpha)
.disappear(Transition.Disappear { view, transition, completion in
.disappear(ComponentTransition.Disappear { view, transition, completion in
if case .none = transition.animation {
completion()
return
@@ -3619,7 +3619,7 @@ private final class PremiumIntroScreenComponent: CombinedComponent {
)
context.add(button
.position(CGPoint(x: context.availableSize.width / 2.0, y: context.availableSize.height - bottomPanel.size.height + bottomPanelPadding + button.size.height / 2.0))
.disappear(Transition.Disappear { view, transition, completion in
.disappear(ComponentTransition.Disappear { view, transition, completion in
if case .none = transition.animation {
completion()
return