show filterbutton only on conferncesList

This commit is contained in:
Felix 2020-04-18 01:30:45 +02:00
parent 209f7f4add
commit 74344a3193
4 changed files with 3 additions and 3 deletions

View file

@ -26,6 +26,7 @@ class ConferenceEventListFragment : EventsListFragment() {
}
override fun setupEvents(binding: FragmentEventsListBinding) {
binding.filterFab.show()
args.conference.let { conference ->
activity?.actionBar?.title = conference.acronym
// setupToolbar(binding.incToolbar.toolbar, conference.title, false)

View file

@ -49,7 +49,7 @@ abstract class EventsListFragment : Fragment() {
}
binding.list.layoutManager = layoutManager
eventAdapter = EventRecyclerViewAdapter { navigateToDetails(it) }
eventAdapter?.setHasStableIds(true)
eventAdapter.setHasStableIds(true)
binding.list.adapter = eventAdapter
layoutManager?.let {
val itemDecoration = DividerItemDecoration(binding.list.context, it.orientation)
@ -59,6 +59,7 @@ abstract class EventsListFragment : Fragment() {
binding.filterFab.setOnClickListener {
FilterBottomSheet().show(childFragmentManager, null)
}
binding.filterFab.hide()
setupEvents(binding)
return binding.root
}

View file

@ -11,7 +11,6 @@ class BookmarksListFragment : EventsListFragment() {
override fun setupEvents(binding: FragmentEventsListBinding) {
binding.incToolbar.toolbar.visibility = View.GONE
binding.filterFab.hide()
eventAdapter.showConferenceName = true
viewModel.getBookmarkedEvents().observe(viewLifecycleOwner, Observer { persistentEvents: List<Event>? ->
persistentEvents?.let { setEvents(it) }

View file

@ -10,7 +10,6 @@ class InProgressListFragment : EventsListFragment() {
override fun setupEvents(binding: FragmentEventsListBinding) {
eventAdapter.showConferenceName = true
binding.filterFab.hide()
viewModel.getInProgressEvents().observe(viewLifecycleOwner, Observer { persistentEvents: List<Event>? ->
persistentEvents?.let { setEvents(it) }
})