debug: добавлено логирование lastReadMessageId для диагностики автоскролла
- Логируем сырое значение из data-last-read-message-id - Логируем решение загрузки (around vs latest) - Поможет понять почему скролит в низ вместо последнего прочитанного
This commit is contained in:
parent
70cefe9dc0
commit
103c3422a5
@ -102,6 +102,13 @@ export class MessageLoaderV2 {
|
||||
try {
|
||||
const { aroundMessageId, limit = this.config.INITIAL_LIMIT } = options;
|
||||
|
||||
console.log('[MessageLoaderV2] 🔍 Load decision:', {
|
||||
aroundMessageId,
|
||||
type: typeof aroundMessageId,
|
||||
isPositive: aroundMessageId > 0,
|
||||
willLoadAround: !!(aroundMessageId && aroundMessageId > 0)
|
||||
});
|
||||
|
||||
let result;
|
||||
if (aroundMessageId && aroundMessageId > 0) {
|
||||
result = await this._loadAround(chatId, aroundMessageId, limit, requestKey);
|
||||
|
||||
@ -71,6 +71,12 @@ function initWhenReady() {
|
||||
lastReadMessageId: appContainer.dataset.lastReadMessageId ? Number(appContainer.dataset.lastReadMessageId) : null
|
||||
};
|
||||
|
||||
console.log('[ChatDetail] 🔍 lastReadMessageId from HTML:', {
|
||||
rawValue: appContainer.dataset.lastReadMessageId,
|
||||
parsedValue: config.lastReadMessageId,
|
||||
type: typeof config.lastReadMessageId
|
||||
});
|
||||
|
||||
// Читаем дополнительные URL из chatScroll (для рендеринга сообщений)
|
||||
const chatScroll = document.getElementById('chatScroll');
|
||||
if (chatScroll) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user