mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Refactoring
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user