Update conversations.php
This commit is contained in:
@@ -1948,6 +1948,20 @@
|
|||||||
if (nearBottomNow && !this._userScrolling) this.scrollToBottom();
|
if (nearBottomNow && !this._userScrolling) this.scrollToBottom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we received any delta messages, perform an immediate full fetch to sync any server-side batching
|
||||||
|
if (messages.length > 0) {
|
||||||
|
if (!this._fullLoadInProgress) {
|
||||||
|
try {
|
||||||
|
if (console && console.debug) console.debug('pollNewMessages: delta returned, triggering immediate full reload');
|
||||||
|
await this.loadMessages(this.currentUserId, true, nearBottomNow && !this._userScrolling);
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('Immediate full reload after delta failed', e);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (console && console.debug) console.debug('Immediate full reload skipped because another full load is in progress');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// update latest timestamp from the last message
|
// update latest timestamp from the last message
|
||||||
try {
|
try {
|
||||||
const last = messages[messages.length - 1];
|
const last = messages[messages.length - 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user