added reset button and fix history

This commit is contained in:
Mohamed Nouffer
2023-09-12 22:08:03 +05:30
parent f64ac1ccfd
commit 30fea7cf8a
2 changed files with 128 additions and 84 deletions

View File

@ -335,8 +335,6 @@ class DestinationController extends GetxController {
is_gps_selected.value = true;
skip_gps = false;
saveGameState();
_start = 0;
chekcs = 0;
rogaining_counted.value = false;
@ -348,16 +346,21 @@ class DestinationController extends GetxController {
print("===== last goal : $last_goal_at =====");
}
//deleteDBDestinations();
// currentSelectedDestinations.forEach((element) {
// deleteDestination(element);
// });
}
void deleteAllDestinations() {
DatabaseHelper db = DatabaseHelper.instance;
db.deleteAllDestinations().then((value) {
PopulateDestinations();
startGPSTimer();
startGame();
//initGPS();
});
// currentSelectedDestinations.forEach((element) {
// deleteDestination(element);
// });
}
void openCamera(BuildContext context) {
@ -824,7 +827,7 @@ class DestinationController extends GetxController {
});
}
void deleteAllDestinations() {
void deleteDBDestinations() {
DatabaseHelper db = DatabaseHelper.instance;
db.deleteAllDestinations().then((value) {
PopulateDestinations();