update messages as user scrolls
as of now we are showing the last 1000 messages in channels. maybe this should be modified to fetch and show older messages as we scroll!?
definitely! i have a module i was writing as part of when i was working on cabal-client that was almost solving that issue. i think i was complicating things unnecessarily though 😅
the solution i opted for was limiting leveldb queries by saying "i want messages that are older than the oldest message i have seen atm" when going backwards in history and also limiting the amount of messages retrieved by some multiple of the amount of messages that can be visible for a single page. so if 20 messages can be viewed, i was getting two pages of 20 messages each, or 2*20 = 40 messages.
@cblgh I think getMessages method you wrote will work great in this scenario since messages are basically timestamp based!
Also tracking this on #225