fix: back button in settings returns to tab bar first (#1354)

## Summary
- Pressing Back while browsing settings within a category now jumps
focus to the category tab bar
- Pressing Back again from the tab bar exits settings to home
- Previously, Back always exited directly to home regardless of scroll
position

Closes #797

## Test plan
- [ ] Scroll deep into a settings category → press Back → tab bar is
focused
- [ ] Press Back again from tab bar → exits to home screen
- [ ] Use category switching (continuous hold) → still works as before
- [ ] Settings are saved on exit (not on tab-bar jump)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: bkb <bkb@arcnode.xyz>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Cache8063
2026-03-11 18:35:48 -05:00
committed by GitHub
parent 3dabd30287
commit 7a28f90dad

View File

@@ -89,8 +89,13 @@ void SettingsActivity::loop() {
}
if (mappedInput.wasPressed(MappedInputManager::Button::Back)) {
SETTINGS.saveToFile();
onGoHome();
if (selectedSettingIndex > 0) {
selectedSettingIndex = 0;
requestUpdate();
} else {
SETTINGS.saveToFile();
onGoHome();
}
return;
}