1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 16:40:32 +00:00

Merge pull request #6688 from litetex/fix-some-build-warnings

Fix some build warnings
This commit is contained in:
Stypox 2021-07-19 11:52:24 +02:00 committed by GitHub
commit 46e7da4e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 20 deletions

View File

@ -167,14 +167,6 @@ class FeedFragment : BaseStateFragment<FeedState>() {
} }
} }
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser)
if (!isVisibleToUser && view != null) {
updateRelativeTimeViews()
}
}
override fun initListeners() { override fun initListeners() {
super.initListeners() super.initListeners()
feedBinding.refreshRootView.setOnClickListener { reloadContent() } feedBinding.refreshRootView.setOnClickListener { reloadContent() }

View File

@ -112,13 +112,6 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
setupInitialLayout() 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) { override fun onAttach(context: Context) {
super.onAttach(context) super.onAttach(context)
subscriptionManager = SubscriptionManager(requireContext()) subscriptionManager = SubscriptionManager(requireContext())
@ -156,11 +149,8 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
super.onCreateOptionsMenu(menu, inflater) super.onCreateOptionsMenu(menu, inflater)
val supportActionBar = activity.supportActionBar activity.supportActionBar?.setDisplayShowTitleEnabled(true)
if (supportActionBar != null) { activity.supportActionBar?.setTitle(R.string.tab_subscriptions)
supportActionBar.setDisplayShowTitleEnabled(true)
setTitle(getString(R.string.tab_subscriptions))
}
} }
private fun setupBroadcastReceiver() { private fun setupBroadcastReceiver() {