Skip to content

Commit

Permalink
Enable fast deceleration for filters on the Discover tab (#23954)
Browse files Browse the repository at this point in the history
  • Loading branch information
kean authored Jan 7, 2025
2 parents 6e32673 + 9879df0 commit 530faff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* [*] Update site menu style on iPhone [#23944]
* [*] Integrate zoom transitions in Themes, Reader [#23945, #23947]
* [*] Fix an issue with site icons cropped in share extensions [#23950]
* [*] Enable fast deceleration for filters on the Discover tab [#23954]


25.6
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ final class ReaderDiscoverHeaderView: ReaderBaseHeaderView, UITextViewDelegate {
scrollView.addSubview(channelsStackView)
scrollView.showsHorizontalScrollIndicator = false
scrollView.clipsToBounds = false
scrollView.decelerationRate = .fast

channelsStackView.pinEdges()
scrollView.heightAnchor.constraint(equalTo: channelsStackView.heightAnchor).isActive = true

Expand Down Expand Up @@ -65,7 +67,7 @@ final class ReaderDiscoverHeaderView: ReaderBaseHeaderView, UITextViewDelegate {

private func updateScrollViewInsets() {
scrollView.contentInset.left = contentView.frame.minX - (isCompact ? 0 : 10)
scrollView.contentInset.right = frame.maxX - contentView.frame.maxX
scrollView.contentInset.right = frame.maxX - contentView.frame.maxX + 10
scrollView.contentOffset = CGPoint(x: -scrollView.contentInset.left, y: 0)
}

Expand Down

0 comments on commit 530faff

Please sign in to comment.