Firebase: .priority value

前端 未结 5 1132
半阙折子戏
半阙折子戏 2021-02-20 05:44
  • How do I check the .priority values are in my \"Forge\"?
  • According to docs, smaller .priority value comes before larger .priority value. If I use seconds since ep
5条回答
  •  不要未来只要你来
    2021-02-20 06:20

    There's no way in Forge right now to see the actual priority values, but the children will be sorted correctly.

    If what you want is to sort items in reverse-chronological-order, I'd suggest simply setting the priority to a normal timestamp (or using push -- it orders them automatically). You can then simply render them backwards to achieve the reverse order you want. For example, rather than appending new messages to the bottom of a list in your app, you could insert them before the first element.

提交回复
热议问题