Refine unread marker and reset registration flow

This commit is contained in:
AidarKC
2026-08-21 15:04:29 +04:00
parent fef7694b48
commit 0a4c31fb36
5 changed files with 33 additions and 6 deletions
+2 -2
View File
@@ -268,7 +268,7 @@ function scrollElementToViewportFraction(element, fraction = 1 / 3, smooth = fal
}
function scrollChannelToUnreadLine(screen, smooth = false) {
return scrollElementToViewportFraction(screen.querySelector('.channel-unread-line'), 1 / 3, smooth);
return scrollElementToViewportFraction(screen.querySelector('.channel-unread-line'), 0.42, smooth);
}
function createChannelReadTracker({
@@ -2150,7 +2150,7 @@ function renderBody(screen, navigate, routeKey, channelData, handlers) {
if (!unreadLineInserted && item.type === 'post' && Number(item?.post?.localNumber || 0) > readCount) {
const unreadLine = document.createElement('div');
unreadLine.className = 'card channel-unread-line';
unreadLine.textContent = `Не прочитано: ${unreadCount}`;
unreadLine.textContent = 'Не прочитанные сообщения';
feed.append(unreadLine);
unreadLineInserted = true;
}