diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index ba0924f0ba7a..a505d5aab873 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -2,7 +2,7 @@ 24.3 ----- - +* [*] [Jetpack-only] Fix the visibility issue with the menu button on the stats [https://github.com/wordpress-mobile/WordPress-Android/pull/20175] 24.2 ----- diff --git a/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/StatsListFragment.kt b/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/StatsListFragment.kt index f45f39109267..c8d09a0b3643 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/StatsListFragment.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/StatsListFragment.kt @@ -81,15 +81,12 @@ class StatsListFragment : ViewPagerFragment(R.layout.stats_list_fragment) { } } - @Suppress("DEPRECATION") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) statsSection = arguments?.getSerializableCompat(LIST_TYPE) ?: activity?.intent?.getSerializableExtraCompat(LIST_TYPE) ?: StatsSection.INSIGHTS - - setHasOptionsMenu(statsSection == StatsSection.INSIGHTS) } override fun onSaveInstanceState(outState: Bundle) { @@ -210,6 +207,12 @@ class StatsListFragment : ViewPagerFragment(R.layout.stats_list_fragment) { } } + override fun onResume() { + super.onResume() + @Suppress("DEPRECATION") + setHasOptionsMenu(statsSection == StatsSection.INSIGHTS) + } + override fun onDestroyView() { super.onDestroyView() binding = null