allinbits / dither

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

Account page, load more button #30

Closed fadeev closed 4 years ago

fadeev commented 4 years ago

A slightly different take on the workings of the account page. The page fetches only the memos it needs (and prefetches next chunks) and hides load button if there are no more memos to load (https://github.com/virgo-project/dither/issues/24). Had to fork CardMemo component into DcMemo, because the former fetches data on mount, and I'm trying to minimize extra requests. For demo purposes I've set chunk size to 3.

https://youtu.be/mAixl7f60Gs

@nylira let me know if I should continue with this.

nylira commented 4 years ago

This looks like a good change, please continue, thanks!

fadeev commented 4 years ago

Making progress on moving all data fetching logic inside Vuex, using Promises. It will help to make the code more declarative. I'm removing most watch functions, because they are no longer needed with promises. It's best to avoid watch wherever possbile, because this feature of Vue (arguably) is hard to reason about.

fadeev commented 4 years ago

https://github.com/virgo-project/dither/pull/36