einsatzprotokoll/source/DeleteDelegate.mc
EiSiMo eea1a835cd Phase 5: delete last event with confirmation countdown
Two-step delete: navigate to "Letzten löschen", press START/STOP
to open confirmation, press again to start 2.5s red arc countdown.
BACK cancels at any point. Currently uses click-to-start instead
of press-and-hold due to simulator key event limitations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:42:57 +02:00

24 lines
520 B
MonkeyC

import Toybox.Lang;
import Toybox.WatchUi;
// Input for DeleteView. START/STOP starts the countdown,
// BACK cancels at any time.
class DeleteDelegate extends WatchUi.BehaviorDelegate {
private var _view as DeleteView;
function initialize(view as DeleteView) {
BehaviorDelegate.initialize();
_view = view;
}
function onSelect() as Boolean {
_view.startHold();
return true;
}
function onBack() as Boolean {
_view.cancel();
return true;
}
}