Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(chatlist): prevent bottom folders from disappearing
  • Loading branch information
Kylmakalle committed Apr 11, 2026
commit 7cdd655435da3805ce86c53e47f7208c1c14fa98
10 changes: 6 additions & 4 deletions submodules/ChatListUI/Sources/ChatListControllerNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1968,12 +1968,12 @@ final class ChatListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
// MARK: Swiftgram
if let sgFoldersView = self.sgFoldersView.view as? HeaderPanelContainerComponent.View {
if sgShouldDisplayBottomFolders && sgFoldersSize.height > 0.0 {
sgFoldersView.layer.removeAnimation(forKey: "opacity")
sgFoldersView.alpha = 1.0
if sgFoldersView.superview == nil {
self.view.addSubview(sgFoldersView)
if transition.isAnimated {
sgFoldersView.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.23)
} else {
sgFoldersView.alpha = 1.0
}
}

Expand All @@ -1993,8 +1993,10 @@ final class ChatListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
// TODO(swiftgram):
sgComponentTransition.setFrame(view: sgFoldersView, frame: CGRect(origin: CGPoint(x: 0.0, y: layout.size.height - bottomInset - sgFoldersSize.height - 16.0), size: sgFoldersSize))
} else {
sgFoldersView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak sgFoldersView] _ in
sgFoldersView?.removeFromSuperview()
sgFoldersView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak sgFoldersView] completed in
if completed {
sgFoldersView?.removeFromSuperview()
}
})
}
}
Expand Down