Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [ANDROAPP-5716] responsive filters on events list #3454

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading