From f1c560a5660c5b510b2b76bbb310ed5be44fac93 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Nov 2025 13:21:19 +0000 Subject: [PATCH] Fix manual swipe behavior to resume rotation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CRITICAL FIX: Manual swipes now properly resume rotation instead of keeping it paused. The issue: - User interacts with page A → rotation pauses - User swipes to page B → rotation should resume, but was staying paused - This was because manualNavigationMode stayed true The fix: - nextTab() and prevTab() now set manualNavigationMode=false AFTER markActivity - This overrides the manualNavigationMode=true set by markActivity - Manual swipes are navigation, not content interaction - Rotation will now resume on the new page (if it has duration > 0) Complete flow now: 1. User touches page → manualNavigationMode=true → rotation pauses 2. After 2min idle → prompt appears with options: - "Return to Rotation" → manualNavigationMode=false → rotation resumes - "I'm still here" → manualNavigationMode stays true → rotation stays paused - Time extension → rotation paused during extension, prompt reappears when expires - No response (15sec) → auto-returns to rotation 3. User swipes to new page → manualNavigationMode=false → rotation resumes Technical changes: - Lines 4054-4072: Reordered nextTab() to set manualNavigationMode=false AFTER markActivity - Lines 4074-4092: Reordered prevTab() to set manualNavigationMode=false AFTER markActivity - Time extensions still cleared on manual swipe (correct behavior) --- install_kiosk_v0.9.10.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/install_kiosk_v0.9.10.sh b/install_kiosk_v0.9.10.sh index 31e096d..d382e3c 100644 --- a/install_kiosk_v0.9.10.sh +++ b/install_kiosk_v0.9.10.sh @@ -4053,36 +4053,42 @@ function attachView(i,isAutoRotation){ function nextTab(){ if(!views.length||showingHidden)return; - console.log('[MANUAL] User switched tab forward → manualNavigationMode=TRUE'); - // CRITICAL FIX: Clear time extension when user manually switches tabs + // v0.9.10: Clear time extension when user manually switches tabs // If user granted time on one page, then manually left, they're done with it if(inactivityExtensionUntil>0){ console.log('[MANUAL] ⏰ Clearing time extension - user manually switched tabs'); inactivityExtensionUntil=0; } - manualNavigationMode=true; currentIndex=(currentIndex+1)%views.length; attachView(currentIndex); markActivity(true); // Actual user interaction - reset lockout timer + + // v0.9.10: Manual swipe RESUMES rotation on new page + // This is navigation, not content interaction - set AFTER markActivity + manualNavigationMode=false; + console.log('[MANUAL] User switched tab forward → manualNavigationMode=FALSE (rotation will resume)'); } function prevTab(){ if(!views.length||showingHidden)return; - console.log('[MANUAL] User switched tab backward → manualNavigationMode=TRUE'); - // CRITICAL FIX: Clear time extension when user manually switches tabs + // v0.9.10: Clear time extension when user manually switches tabs // If user granted time on one page, then manually left, they're done with it if(inactivityExtensionUntil>0){ console.log('[MANUAL] ⏰ Clearing time extension - user manually switched tabs'); inactivityExtensionUntil=0; } - manualNavigationMode=true; currentIndex=(currentIndex-1+views.length)%views.length; attachView(currentIndex); markActivity(true); // Actual user interaction - reset lockout timer + + // v0.9.10: Manual swipe RESUMES rotation on new page + // This is navigation, not content interaction - set AFTER markActivity + manualNavigationMode=false; + console.log('[MANUAL] User switched tab backward → manualNavigationMode=FALSE (rotation will resume)'); } function getHomeViewIndex(){