diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt index c235b22df..a64ffee1e 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt @@ -167,14 +167,6 @@ class FeedFragment : BaseStateFragment() { } } - override fun setUserVisibleHint(isVisibleToUser: Boolean) { - super.setUserVisibleHint(isVisibleToUser) - - if (!isVisibleToUser && view != null) { - updateRelativeTimeViews() - } - } - override fun initListeners() { super.initListeners() feedBinding.refreshRootView.setOnClickListener { reloadContent() } diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt index 5b5bda498..a92e4f1fc 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt @@ -112,13 +112,6 @@ class SubscriptionFragment : BaseStateFragment() { setupInitialLayout() } - override fun setUserVisibleHint(isVisibleToUser: Boolean) { - super.setUserVisibleHint(isVisibleToUser) - if (activity != null && isVisibleToUser) { - setTitle(activity.getString(R.string.tab_subscriptions)) - } - } - override fun onAttach(context: Context) { super.onAttach(context) subscriptionManager = SubscriptionManager(requireContext()) @@ -156,11 +149,8 @@ class SubscriptionFragment : BaseStateFragment() { override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { super.onCreateOptionsMenu(menu, inflater) - val supportActionBar = activity.supportActionBar - if (supportActionBar != null) { - supportActionBar.setDisplayShowTitleEnabled(true) - setTitle(getString(R.string.tab_subscriptions)) - } + activity.supportActionBar?.setDisplayShowTitleEnabled(true) + activity.supportActionBar?.setTitle(R.string.tab_subscriptions) } private fun setupBroadcastReceiver() {