3-section layout (15/70/15) for browsing recorded events. Reverse-geocodes coordinates via Photon API with Haversine distance check and address caching. Also adds simulator GPS polling fallback (Position.getInfo) since the simulator does not fire location event callbacks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
650 B
MonkeyC
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.showNext();
|
|
return true;
|
|
}
|
|
|
|
function onPreviousPage() as Boolean {
|
|
_view.showPrev();
|
|
return true;
|
|
}
|
|
|
|
function onBack() as Boolean {
|
|
WatchUi.popView(WatchUi.SLIDE_RIGHT);
|
|
return true;
|
|
}
|
|
}
|