How can I reverse the order of this list in from Firebase? I want the last item to be the first. I tried to use queryOrdered
, but that did not make a difference
One trick that I'm using is to add a field to my object that stores the time-stamp as reversed value. The value of this field I compute when I persist the object and is reversedDateCreated = timeStamp * -1
Now you can use default Firebase orderBy
methods in order to sort and paginate by reversedDateCreated
field