refactor(doorbell): check hold completion before release handling

This commit is contained in:
2026-02-19 19:22:49 -08:00
parent dfd511e499
commit f367bd365b
2 changed files with 9 additions and 1 deletions

View File

@@ -319,6 +319,14 @@ void DoorbellLogic::setScreen(ScreenID s) {
}
int DoorbellLogic::handleTouch(const TouchEvent& evt) {
// Check hold completion FIRST - before any release handling
// This ensures hold-to-silence works on ALERT screen
if(evt.released && _state.deviceState == DeviceState::ALERTING) {
if(updateHold(evt)) {
return (int)TileAction::SILENCE;
}
}
// Handle press - show visual feedback
if(evt.pressed) {
// Reset inactivity timer on any touch