Update conversations.php
This commit is contained in:
@@ -2113,6 +2113,15 @@
|
|||||||
messages = data;
|
messages = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Guard: cuando paginamos (initial=false) y la respuesta no trae mensajes,
|
||||||
|
// no reemplazar ni limpiar la conversación actual; solo indicar que no hay más.
|
||||||
|
if (!initial && Array.isArray(messages) && messages.length === 0) {
|
||||||
|
try { if (topLoader && topLoader.parentNode) topLoader.remove(); } catch(e) {}
|
||||||
|
this.hasMoreMessages = false;
|
||||||
|
// preserve current view and stop further processing
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (initial) {
|
if (initial) {
|
||||||
this.conversations = messages;
|
this.conversations = messages;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user