Update conversations.php

This commit is contained in:
Lizandro Guarnizo
2026-01-24 01:41:37 -05:00
parent 835a7badd2
commit 6f0d1bae51
+3 -1
View File
@@ -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);
}