remove variable header size

This commit is contained in:
2026-07-03 11:10:14 +02:00
parent b3cf5e4787
commit 3642635b20
4 changed files with 9 additions and 310 deletions
-20
View File
@@ -14,13 +14,6 @@ const layout = ref(localStorage.getItem('layout') || 'list') // 'list' | 'cards'
let observer; // Declare observer outside the setup function
let initialLoad = false
// Set right before the scroll-position correction below, so AppNav's
// scroll-driven header compacting can tell "the page just moved because
// content was removed" apart from a real user scroll — otherwise every
// article marked read (which resets scrollY toward the top of the
// now-shorter list) would look identical to the user manually scrolling
// back to the top.
let scrollCorrectionPending = false
export function authHeaders() {
return {
@@ -272,7 +265,6 @@ function handleIntersection(entries, topbarHeight = 0) {
if (first) {
const top = first.getBoundingClientRect().top
if (top < topbarHeight) {
scrollCorrectionPending = true
window.scrollBy(0, top - topbarHeight)
}
}
@@ -280,17 +272,6 @@ function handleIntersection(entries, topbarHeight = 0) {
})
}
// Consume-once: returns whether a scroll-position correction is pending
// (and clears it), so a caller can tell this scroll event apart from a
// real user scroll without the flag lingering into later, unrelated ones.
function consumeScrollCorrection() {
if (scrollCorrectionPending) {
scrollCorrectionPending = false
return true
}
return false
}
function disconnectObserver() {
if (observer) {
observer.disconnect()
@@ -405,7 +386,6 @@ export function useFeeds() {
markAllRead,
showMessageForXSeconds,
setupIntersectionObserver,
consumeScrollCorrection,
disconnectObserver,
setInitialLoad,
handleIntersection,