allinbits / dither

Transparent, uncensorable chat on the Cosmos Hub.
https://dither.chat
14 stars 2 forks source link

Home and Account: fetching data #36

Closed fadeev closed 4 years ago

fadeev commented 4 years ago

This PR adds data fetching logic to Home and Account page components. This is a first step of moving away from having such logic in App components.

When Home component is mounted, list of following accounts is fetched if the user is authenticated, otherwise a list of default accounts is retured. For each following account a real-time connection is opened. Since openDBChannel does not have a limit option, all memos are streamed and "Show more" button inserts more of them into the DOM.

https://youtu.be/bNWVmt2giTU

nylira commented 4 years ago

These are such good changes. Thanks for looking into this Denis!