Update conversations.php
This commit is contained in:
+3
-1
@@ -1534,9 +1534,11 @@
|
|||||||
}, 30000);
|
}, 30000);
|
||||||
|
|
||||||
// Actualizar mensajes del chat activo cada 10 segundos
|
// Actualizar mensajes del chat activo cada 10 segundos
|
||||||
|
// Use incremental load (initial=false) to avoid forcing scroll to bottom while the user reads
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
if (this.currentUserId) {
|
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);
|
}, 10000);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user