Simplified code and adjusted the style so that it's similar to FeedFragment

pull/6688/head
litetex 2021-07-16 21:21:10 +02:00
rodzic 08d5dfa49c
commit f4e2eca256
1 zmienionych plików z 2 dodań i 12 usunięć

Wyświetl plik

@ -112,13 +112,6 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
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<SubscriptionState>() {
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() {