DSpotDevelopers / declex

DecleX - Declarative Framework for Android, easier and faster coding.
Other
168 stars 25 forks source link

Populating a loaded list from firebase #202

Open yasmanmesa opened 6 years ago

yasmanmesa commented 6 years ago

A case has happened to me in which I have an object that contains a list and I'm doing a populate.

Here I put the created object:

    @Model(lazy = true)
    @Populate
    Object_ object

Here is the list of another object in the model of the object that I am doing the populate:

    /*
    * The otherObject list into Object model
    */
    List<OtherObject_> otherObjectList

When I delete the last item from that list and reload the model, the list reloaded from Firebase is loaded with null value, since there are no other elements.

As a consequence, DecleX does not evaluate this situation and keeps the list as null. When the populate is going to be done, since the list is not null, the view is not refreshed with the list and the last item in the application is visually maintained.