Skip to content

Commit

Permalink
fix: [ANDROAPP-5716] responsive filters on events list
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmateos committed Jan 2, 2024
1 parent b431e75 commit 77578df
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class EventListFragment : FragmentGlobalAbstract(), EventListFragmentView {
lateinit var binding: FragmentProgramEventDetailListBinding
private var liveAdapter: ProgramEventDetailLiveAdapter? = null
private val programEventsViewModel: ProgramEventDetailViewModel by activityViewModels()
private var liveDataList: LiveData<PagedList<EventViewModel>>? = null

@Inject
lateinit var presenter: EventListPresenter
Expand Down Expand Up @@ -97,9 +98,9 @@ class EventListFragment : FragmentGlobalAbstract(), EventListFragmentView {
}

override fun setLiveData(pagedListLiveData: LiveData<PagedList<EventViewModel>>) {
pagedListLiveData.observe(
this,
) { pagedList: PagedList<EventViewModel> ->
liveDataList?.removeObservers(viewLifecycleOwner)
this.liveDataList = pagedListLiveData
liveDataList?.observe(viewLifecycleOwner) { pagedList: PagedList<EventViewModel> ->
programEventsViewModel.setProgress(false)
liveAdapter?.submitList(pagedList) {
if ((binding.recycler.adapter?.itemCount ?: 0) == 0) {
Expand Down

0 comments on commit 77578df

Please sign in to comment.