diff --git a/src/components/nostr/ChatComponent.vue b/src/components/nostr/ChatComponent.vue index 2374a9d..e65ead1 100644 --- a/src/components/nostr/ChatComponent.vue +++ b/src/components/nostr/ChatComponent.vue @@ -114,7 +114,8 @@ -
+ + @@ -403,8 +404,10 @@ const selectPeer = async (peer: Peer) => { // Subscribe to messages from this peer await subscribeToPeer(peer.pubkey) - // Don't scroll when selecting a peer - let user see existing messages - // Only scroll when new messages arrive + // Scroll to bottom to show latest messages when selecting a peer + nextTick(() => { + scrollToBottom() + }) } const sendMessage = async () => {