Hi,
Is there any way to give ascending or decsending type of sorting to scroll ref.
This is how I get values from firebase db:
var scrollRef = new firebase.util.Scroll(messagesRef, 'timestamp');
If I get reverse order of values my infinite scroll will work fine.
I tried negative timestamp I think this is another way but getting time from local user machine is not a safe way. I mean while adding message to firebase db I have tried this way:
timestampNegative : 0 - Date.now()
I thought that maybe there is a way to change the type of sorting
Thanks
Hi,
Is there any way to give ascending or decsending type of sorting to scroll ref.
This is how I get values from firebase db:
var scrollRef = new firebase.util.Scroll(messagesRef, 'timestamp');If I get reverse order of values my infinite scroll will work fine.
I tried negative timestamp I think this is another way but getting time from local user machine is not a safe way. I mean while adding message to firebase db I have tried this way:
timestampNegative : 0 - Date.now()I thought that maybe there is a way to change the type of sorting
Thanks