Simplified code and adjusted the style so that it's similar to FeedFragment
This commit is contained in:
parent
08d5dfa49c
commit
f4e2eca256
1 changed files with 2 additions and 12 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue