From 760d0a812618710528a440b2f0b416e77eabf18e Mon Sep 17 00:00:00 2001 From: alltheseas Date: Sun, 4 Jan 2026 18:28:12 -0600 Subject: [PATCH] longform: change focus mode to only hide chrome on scroll down, tap to restore Previously scrolling up would restore the nav/tab bars. Now only tapping restores chrome, giving a cleaner reading experience without accidental restoration while scrolling. Changelog-Changed: Changed focus mode to only hide navigation on scroll down Signed-off-by: alltheseas --- damus/Features/Chat/ChatroomThreadView.swift | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/damus/Features/Chat/ChatroomThreadView.swift b/damus/Features/Chat/ChatroomThreadView.swift index 38ca7cd8..ccd2d13a 100644 --- a/damus/Features/Chat/ChatroomThreadView.swift +++ b/damus/Features/Chat/ChatroomThreadView.swift @@ -69,22 +69,18 @@ struct ChatroomThreadView: View { } /// Updates chrome visibility based on scroll direction (longform only). - /// Scrolling down hides chrome, scrolling up shows it. + /// Scrolling down hides chrome; tap to restore (scroll up does not restore). private func updateChromeVisibility(newY: CGFloat) { guard isLongformEvent else { return } let delta = newY - lastScrollY - // Only toggle chrome state if scroll exceeds threshold - if abs(delta) > scrollThreshold { - let shouldHide = delta < 0 // Scrolling down (content moving up) - - if shouldHide != chromeHidden { - withAnimation(.easeInOut(duration: 0.25)) { - chromeHidden = shouldHide - } - notify(.display_tabbar(!shouldHide)) + // Only hide chrome on scroll down, don't restore on scroll up (use tap instead) + if delta < -scrollThreshold && !chromeHidden { + withAnimation(.easeInOut(duration: 0.25)) { + chromeHidden = true } + notify(.display_tabbar(false)) } // Always update lastScrollY to prevent stale delta accumulation