Fix: Manual swipe now counts as interaction for inactivity prompt
CRITICAL FIX: Manual swipes to 0-time pages now trigger inactivity prompts. The problem: - User swipes to a 0-time (manual) page but doesn't touch it - userInteractedWithCurrentSite stays false - No inactivity prompt ever appears - Kiosk stuck on that page forever The fix: - Manual swipe now explicitly sets userInteractedWithCurrentSite=true - Swipe counts as engagement with the new page - After inactivity timeout, prompt appears even if user never touched page - Ensures "Return to Rotation" mechanism works on ALL pages Complete flow now works as designed: 1. Normal rotation with duration > 0 sites 2. User interacts with ANY site → rotation pauses 3. After 2min inactivity → prompt appears - "Return to Rotation" → returns to home, resumes rotation - "I'm still here" → waits another 2min, prompt again - Time extension (5/15/30/60 min) → waits that long, prompt again - No response (15 sec) → auto-returns to rotation 4. User swipes to new page → counts as interaction, rotation resumes 5. Media playing → blocks all rotation and prompts (30s grace period) 6. Display schedule → screen blanks, app keeps running 7. Password/lockout → takes precedence on boot/resume/timeout Technical changes: - Lines 4072-4075: Set userInteractedWithCurrentSite=true in nextTab() - Lines 4097-4100: Set userInteractedWithCurrentSite=true in prevTab() - Ensures inactivity logic works even on untouched 0-time pages This completes the comprehensive rotation/inactivity system.
This commit is contained in:
@@ -4068,6 +4068,11 @@ function nextTab(){
|
||||
// v0.9.10: Manual swipe RESUMES rotation on new page
|
||||
// This is navigation, not content interaction - set AFTER markActivity
|
||||
manualNavigationMode=false;
|
||||
|
||||
// v0.9.10: Manual swipe counts as interaction with new page
|
||||
// This ensures inactivity prompt will fire even on 0-time pages
|
||||
// If user swipes to page B but never touches it, prompt still appears after timeout
|
||||
userInteractedWithCurrentSite=true;
|
||||
console.log('[MANUAL] User switched tab forward → manualNavigationMode=FALSE (rotation will resume)');
|
||||
}
|
||||
|
||||
@@ -4088,6 +4093,11 @@ function prevTab(){
|
||||
// v0.9.10: Manual swipe RESUMES rotation on new page
|
||||
// This is navigation, not content interaction - set AFTER markActivity
|
||||
manualNavigationMode=false;
|
||||
|
||||
// v0.9.10: Manual swipe counts as interaction with new page
|
||||
// This ensures inactivity prompt will fire even on 0-time pages
|
||||
// If user swipes to page B but never touches it, prompt still appears after timeout
|
||||
userInteractedWithCurrentSite=true;
|
||||
console.log('[MANUAL] User switched tab backward → manualNavigationMode=FALSE (rotation will resume)');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user