SaitoTech / saito-lite-rust

a version of the Saito-Lite client written for compatibility with the Saito Rust client and binary data format
24 stars 28 forks source link

Ring-a-ring-of-nofitications #2443

Open f8daniel opened 6 months ago

f8daniel commented 6 months ago

I seem to cycle through notifications each time I click. Not sure if this is intended behaviour, but my sense is it should fetch any new ones on click and show them in chrono order.

https://github.com/SaitoTech/saito-lite-rust/assets/2867779/af41990c-b333-4e9f-ab75-2bbc315c7e8f

f8daniel commented 6 months ago

I am finally seeing this behavior

f8daniel commented 6 months ago

I disabled the intersection observer while it is loading new (older) notifications and added some logging to see the returns. That should make the behavior a little more reasonable.

The cycling through is an artefact of you click and render any notifications sitting in memory (received txs), and check archive for more, the more get added to the bottom, but that may not be the true order, so when you click the should get completely rerendered in the correct order. I think the problem was the intersection observer being a little aggressive in firing off multiple events with independent callbacks the affect the rendering of the page