einsatzprotokoll/source/HistoryDelegate.mc
EiSiMo bcac9cbaa4 Swap history UP/DOWN direction for intuitive navigation
DOWN goes to older events (lower index), UP to newer.

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

29 lines
650 B
MonkeyC

import Toybox.Lang;
import Toybox.WatchUi;
// Input handler for HistoryView. UP/DOWN scroll through events,
// BACK returns to the menu.
class HistoryDelegate extends WatchUi.BehaviorDelegate {
private var _view as HistoryView;
function initialize(view as HistoryView) {
BehaviorDelegate.initialize();
_view = view;
}
function onNextPage() as Boolean {
_view.showPrev();
return true;
}
function onPreviousPage() as Boolean {
_view.showNext();
return true;
}
function onBack() as Boolean {
WatchUi.popView(WatchUi.SLIDE_RIGHT);
return true;
}
}