Merge commit '3bacb78f084eda80c52a9245a94c980073fbcab8'

# Conflicts:
#	submodules/DebugSettingsUI/Sources/DebugController.swift
This commit is contained in:
Ali
2022-06-08 00:39:58 +04:00
35 changed files with 720 additions and 429 deletions

View File

@@ -342,12 +342,15 @@ private final class DemoPagerComponent: Component {
fatalError("init(coder:) has not been implemented")
}
private var ignoreContentOffsetChange = false
public func scrollViewDidScroll(_ scrollView: UIScrollView) {
guard let component = self.component else {
guard let component = self.component, !self.ignoreContentOffsetChange else {
return
}
self.ignoreContentOffsetChange = true
let _ = self.update(component: component, availableSize: self.bounds.size, transition: .immediate)
self.ignoreContentOffsetChange = false
}
func update(component: DemoPagerComponent, availableSize: CGSize, transition: Transition) -> CGSize {
@@ -740,7 +743,7 @@ private final class DemoSheetContent: CombinedComponent {
context: component.context,
position: .top,
videoFile: configuration.videos["faster_download"],
hasStars: true
decoration: .fasterStars
)),
title: strings.Premium_FasterSpeed,
text: strings.Premium_FasterSpeedInfo,
@@ -845,7 +848,8 @@ private final class DemoSheetContent: CombinedComponent {
content: AnyComponent(PhoneDemoComponent(
context: component.context,
position: .top,
videoFile: configuration.videos["profile_badge"]
videoFile: configuration.videos["profile_badge"],
decoration: .badgeStars
)),
title: strings.Premium_Badge,
text: strings.Premium_BadgeInfo,