Skip to content

Commit 2d1a96a

Browse files
authored
Reader: Show Reader navigation menu when scrolling to top (#22573)
2 parents 3b06ca2 + 296b3b6 commit 2d1a96a

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ import WordPressUI
787787

788788
/// Scrolls to the top of the list of posts.
789789
@objc func scrollViewToTop() {
790+
navigationMenuDelegate?.didScrollToTop()
790791
guard tableView.numberOfRows(inSection: .zero) > 0 else {
791792
tableView.setContentOffset(.zero, animated: true)
792793
return

WordPress/Classes/ViewRelated/Reader/Tab Navigation/ReaderNavigationMenu.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ protocol ReaderNavigationMenuDelegate: AnyObject {
44
func scrollViewDidScroll(_ scrollView: UIScrollView, velocity: CGPoint)
55
func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>)
66
func didTapDiscoverBlogs()
7+
func didScrollToTop()
78
}
89

910
struct ReaderNavigationMenu: View {

WordPress/Classes/ViewRelated/Reader/Tab Navigation/ReaderTabView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,8 @@ extension ReaderTabView: ReaderNavigationMenuDelegate {
249249
viewModel.showTab(at: discoverIndex)
250250
}
251251

252+
func didScrollToTop() {
253+
updateMenuDisplay(hidden: false)
254+
}
255+
252256
}

0 commit comments

Comments
 (0)