This is not an issue but a question regarding FUITableViewDataSource. I am creating an app which is like Twitter, so I have tableView, and I have "pull to refresh" for downloading new data. When I use Firebase as tableView data source then every time I update Firebase my tableView updates automatically. I don't want that; I want users to get little notification (or something similar) when there are newer posts so they can refresh it manually. Is that possible?
You could just write a bool flag under your user has_new_posts and observe that, but then you would have to manually pull updates from Firebase instead of just using a snapshot observer.
The problem is that everybody sees all posts, so if 1000 users are posting at the same time then users reading would get scrambled UI. Is there maybe a way to just "pause" this. And continue if a user interacts with UI? If not FUITableViewDataSource is not for me I guess.
Yeah, all of the classes in FirebaseUI/Database are designed to keep a Firebase collection in sync with a local collection class, which works ideally for a small set of data where updates latency is really important.
It sounds here like you're wrestling with a larger set of data where update latency isn't as important, so FirebaseUI doesn't really have anything to help you out. We are open to feature requests though, if you find yourself building the same stuff around Firebase over and over again just let us know.
If somebody is building a messaging app, this is perfect, but for feed maybe there could be a function which is triggered when Firebase detects new data, and then a developer can build some UI control for syncing it with tableView (like i.e. Twitter has). That would be nice.
You could in theory build this sort of control around FUIArray, which lets you manually stop and start data syncs. Currently FUIArray is missing the logic to handle being desynced from a query for a while and then catching up--ideally it would keep its contents to minimize the cost of desyncing and be able to efficiently diff and update itself with the new contents (i.e. avoid just deleting everything in the array and replacing it again).
+1 to this feature request
This is now how Firestore UI behaves, though the behavior has not been ported back to Database UI.
I'll close this issue for now and re-open it if there's more support for porting this behavior back to Database.
Most helpful comment
+1 to this feature request