the-dagger / Global-Launchpad-Initiative

Android App for Global Launchpad Initiative
2 stars 1 forks source link

replace recyclerAdapter by Firebase recycler Adapter #5

Closed gogeta95 closed 7 years ago

the-dagger commented 7 years ago

Benefits?

gogeta95 commented 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

the-dagger commented 7 years ago

Cool. SwipeToRefresh looks cool tho :p

gogeta95 commented 7 years ago

but this needs object to be updated a lil bit, as firebase doesn't support sorting descendent, so new stuff comes at bottom.

the-dagger commented 7 years ago

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.

gogeta95 commented 7 years ago

so.. existing code or firbase adapter + new field in object?

the-dagger commented 7 years ago

New field for?

gogeta95 commented 7 years ago

-1*time so sort on that, using firebase query.

the-dagger commented 7 years ago

Ok, cool. Let's use firebaseAdapter then.

gogeta95 commented 7 years ago

done, had to clear whole database to test sorting