Closed gogeta95 closed 7 years ago
more realtime + cleaner code + no need of swipe refresh check this https://github.com/firebase/FirebaseUI-Android/blob/master/database/README.md#create-a-custom-firebaserecycleradapter
Cool. SwipeToRefresh looks cool tho :p
but this needs object to be updated a lil bit, as firebase doesn't support sorting descendent, so new stuff comes at bottom.
Oh I see. We can always reverse the list before setting it to the adapter, so that the latest item comes at the first, similar to what I'm doing now.
so.. existing code or firbase adapter + new field in object?
New field for?
-1*time
so sort on that, using firebase query.
Ok, cool. Let's use firebaseAdapter then.
done, had to clear whole database to test sorting
Benefits?