Skip to content

Commit 6ead7b3

Browse files
committed
Add analytics
1 parent 8e0026c commit 6ead7b3

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

WordPress/Classes/Utility/Analytics/WPAnalyticsEvent.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ import Foundation
116116
case readerCommentTextCopied
117117
case readerPostContextMenuButtonTapped
118118
case readerAddSiteToFavoritesTapped
119+
case readerButtonScrollToTopTapped
119120

120121
// Stats - Empty Stats nudges
121122
case statsPublicizeNudgeShown
@@ -816,6 +817,8 @@ import Foundation
816817
return "reader_post_context_menu_button_tapped"
817818
case .readerAddSiteToFavoritesTapped:
818819
return "reader_add_site_to_favorites_tapped"
820+
case .readerButtonScrollToTopTapped:
821+
return "reader_button_scroll_to_top_tapped"
819822

820823
// Stats - Empty Stats nudges
821824
case .statsPublicizeNudgeShown:

WordPress/Classes/ViewRelated/Reader/Controllers/ReaderStreamViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ extension ReaderStreamViewController: UITableViewDelegate, JPScrollViewDelegate
16701670
layoutEmptyStateView()
16711671
processJetpackBannerVisibility(scrollView)
16721672
titleView.updateAlpha(in: scrollView)
1673-
buttonScrollToTop.setButtonHidden(scrollView.contentOffset.y < bounds.height / 3, animated: true)
1673+
buttonScrollToTop.setButtonHidden(scrollView.contentOffset.y < view.bounds.height / 3, animated: true)
16741674
}
16751675
}
16761676

WordPress/Classes/ViewRelated/Reader/ReaderButtonScrollToTop.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ final class ReaderButtonScrollToTop: UIButton {
1414

1515
return ReaderButtonScrollToTop(configuration: configuration, primaryAction: .init { _ in
1616
closure()
17+
WPAnalytics.track(.readerButtonScrollToTopTapped)
1718
})
1819
}
1920

0 commit comments

Comments
 (0)