mikepenz / FastAdapter

The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...
https://mikepenz.dev
Apache License 2.0
3.84k stars 494 forks source link

List is not updating after adapter.set() #1025

Closed behnawwm closed 2 years ago

behnawwm commented 2 years ago

First of all, thanks a lot for your great library!

I have a refresh mechanism that fetches data from API, caches it into a DB, and refresh the list based on DB items.

I set itemAdapters in a observe function of a LiveData which gets a List of items in DB. but after set(), the list is not getting updated. (it blinks means refreshed, but nothing changes) . What am i missing here?

I also call the updateItems() function in onResume and when fragment transactions happen, List would update!


viewModel.livedataDevices.observe(viewLifecycleOwner) {
                itemAdapter.set(listItems)
            }