cabal-desktop icon indicating copy to clipboard operation
cabal-desktop copied to clipboard

update messages as user scrolls

Open khubo opened this issue 5 years ago • 3 comments

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!?

khubo avatar Feb 10 '20 03:02 khubo

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 avatar Feb 10 '20 09:02 cblgh

@cblgh I think getMessages method you wrote will work great in this scenario since messages are basically timestamp based!

khubo avatar Feb 10 '20 10:02 khubo

Also tracking this on #225

todrobbins avatar Feb 18 '20 18:02 todrobbins