relaycc / relay

relay.cc is a web3 directory of apps and profiles, plus the easiest way to message each of them.
https://www.relay.cc
5 stars 3 forks source link

Conversation list scroll level is remembered after entering and backing from a DM #386

Closed seanonchain closed 1 year ago

seanonchain commented 1 year ago

Describe the bug. Include a video.

https://www.loom.com/share/e37f034bea34409bbf59a52cf54ec07c

What is the expected behavior?

If I'm in my conversation list, and enter into a 1:1 DM with someone, when I go back I should still be at the same scroll level.

What is the actual behavior?

I'm brought back to the top of the conversation list.

How can you reproduce the bug?

have an inbox with more than one page (8+) of conversations, go into a DM with the last one, then press back.

killthebuddh4 commented 1 year ago

@matejcsok-ee @Aaron-EE I think we probably want to just store the scroll state in a zustand store and read from the store when we mount the component. Or some other similar solution.