Убрать нижнюю кнопку в каналах

This commit is contained in:
AidarKC
2026-09-08 17:54:34 +04:00
parent 7d27bfdcaf
commit 1f70d36e74
3 changed files with 20 additions and 17 deletions
+1 -15
View File
@@ -1094,14 +1094,6 @@ function renderListContent({ screen, container, listState, navigate, refreshFeed
container.append(list);
}
function updateBottomCta({ button }) {
if (!button) return;
button.hidden = true;
button.textContent = '';
button.className = 'channels-bottom-action';
button.onclick = null;
}
async function loadFeedAndRender({ screen, listState, contentEl, navigate }) {
renderSkeletonList(contentEl, 5);
@@ -1215,9 +1207,6 @@ export function render({ navigate, route, chrome }) {
});
const topMenuBtn = topBarEl.querySelector('.channels-top-more-btn');
const bottomCta = document.createElement('button');
bottomCta.type = 'button';
const reloadFeed = async () => loadFeedAndRender({ screen, listState, contentEl, navigate });
const rerenderList = () => {
@@ -1234,18 +1223,15 @@ export function render({ navigate, route, chrome }) {
topTitle.textContent = channelsViewTitle(listState.viewMode);
topMenuBtn.style.display = '';
updateBottomCta({ button: bottomCta });
};
chrome?.setTopbar(topBarEl);
screen.append(contentEl, bottomCta);
screen.append(contentEl);
if (createSuccessFlash) {
showToast(createSuccessFlash);
}
updateBottomCta({ button: bottomCta });
// Применяем корректное состояние хедера сразу на первом рендере,
// чтобы не показывать лишние кнопки до первой перерисовки.
rerenderList();