This commit is contained in:
Ali
2023-06-25 00:10:41 +03:00
parent f3c0a20a61
commit a7ab23f97a
12 changed files with 191 additions and 112 deletions

View File

@@ -847,14 +847,6 @@ public final class ChatListHeaderComponent: Component {
}
let sideContentWidth: CGFloat = 0.0
/*if let storySubscriptions = component.storySubscriptions, !storySubscriptions.items.isEmpty {
sideContentWidth = self.storyPeerListExternalState.collapsedWidth + 12.0
}
if let chatListTitle = primaryContent.chatListTitle {
if chatListTitle.activity {
sideContentWidth = 0.0
}
}*/
primaryContentView.update(context: component.context, theme: component.theme, strings: component.strings, content: primaryContent, backTitle: primaryContent.backTitle, sideInset: component.sideInset, sideContentWidth: sideContentWidth, sideContentFraction: (1.0 - component.storiesFraction), size: availableSize, transition: primaryContentTransition)
primaryContentTransition.setFrame(view: primaryContentView, frame: CGRect(origin: CGPoint(), size: availableSize))

View File

@@ -610,44 +610,6 @@ public final class ChatListNavigationBar: Component {
return size
}
/*private func addStoriesUnlockedAnimation(duration: Double, animateScrollUnlocked: Bool) {
guard let component = self.component else {
return
}
self.applyScrollFractionAnimator?.invalidate()
self.applyScrollFractionAnimator = nil
let storiesUnlocked = component.storiesUnlocked
self.storiesOffsetStartFraction = self.storiesOffsetFraction
self.storiesUnlockedStartFraction = self.storiesUnlockedFraction
self.applyScrollFraction = 0.0
self.applyScrollUnlockedFraction = 0.0
self.applyScrollFractionAnimator = DisplayLinkAnimator(duration: duration * UIView.animationDurationFactor(), from: 0.0, to: 1.0, update: { [weak self] value in
guard let self else {
return
}
let t = listViewAnimationCurveSystem(value)
self.applyScrollFraction = t
if animateScrollUnlocked {
self.applyScrollUnlockedFraction = storiesUnlocked ? t : (1.0 - t)
}
if let rawScrollOffset = self.rawScrollOffset {
self.hasDeferredScrollOffset = true
self.applyScroll(offset: rawScrollOffset, allowAvatarsExpansion: self.currentAllowAvatarsExpansion, transition: .immediate)
}
}, completion: { [weak self] in
guard let self else {
return
}
self.applyScrollFractionAnimator?.invalidate()
self.applyScrollFractionAnimator = nil
})
}*/
}
public func makeView() -> View {