orbitdb-archive / orbit

A distributed, serverless, peer-to-peer chat application on IPFS
MIT License
1.64k stars 116 forks source link

Fix channel history fetching #123

Closed haadcode closed 7 years ago

haadcode commented 7 years ago

Currently 64 messages are fetched from the history upon joining. This doesn't work that well and it'd be better to fetch the history on-demand.

Fetch 1 items, render, fetch second, render, etc. up to the height of the channel view (ie. what you see in your client). When the user scroll up to see older messages, the client triggers another fetch, etc. Might be good to fetch in bigger batches, say, 8 items at a time, but will have to try this out and see what feels good for the UX.

haadcode commented 7 years ago

Depends on https://github.com/haadcode/ipfs-log/issues/4