Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions source/QZCompanionGarminDelegate.mc
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ class QZCompanionGarminDelegate extends WatchUi.BehaviorDelegate {
var session = null; // set up session variable

function onBack() {
if (Toybox has :ActivityRecording) {
return false;
if (Toybox has :ActivityRecording) {
if ((session != null) && session.isRecording()) {
session.discard(); // discard the session
session = null; // set session control variable to null
// and don't exit
return true;
}
}
return true;
// now you can exit since the activity is discarded
return false;
}

// use the select Start/Stop or touch for recording
Expand Down