From 6f0d1bae515c0463cd0addaba287e735e312e333 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sat, 24 Jan 2026 01:41:37 -0500 Subject: [PATCH] Update conversations.php --- conversations.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conversations.php b/conversations.php index 6286889..c53cb50 100644 --- a/conversations.php +++ b/conversations.php @@ -1534,9 +1534,11 @@ }, 30000); // Actualizar mensajes del chat activo cada 10 segundos + // Use incremental load (initial=false) to avoid forcing scroll to bottom while the user reads setInterval(() => { if (this.currentUserId) { - this.loadconversations(this.currentUserId, false); + // loadMessages with initial=false fetches older/newer messages without forcing a scroll + this.loadMessages(this.currentUserId, false).catch(err => console.warn('Periodic loadMessages failed', err)); } }, 10000); }