refactor(doorbell): check hold completion before release handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user