updated for retain rogainin after goal

This commit is contained in:
2024-03-08 18:19:18 +05:30
parent cb3a843566
commit c6eb97bbb2
2 changed files with 6 additions and 4 deletions

View File

@ -425,7 +425,7 @@ class DestinationController extends GetxController {
return; return;
} }
Future<void> resetRogaining() async { Future<void> resetRogaining({bool isgoal = false}) async {
//print("----- resetting --------"); //print("----- resetting --------");
isInCheckin.value = false; isInCheckin.value = false;
@ -442,8 +442,10 @@ class DestinationController extends GetxController {
DatabaseHelper db = DatabaseHelper.instance; DatabaseHelper db = DatabaseHelper.instance;
await db.deleteAllDestinations(); if (isgoal == false) {
await db.deleteAllRogaining(); await db.deleteAllDestinations();
await db.deleteAllRogaining();
}
int? latgoal = await db.latestGoal(); int? latgoal = await db.latestGoal();
if (latgoal != null) { if (latgoal != null) {

View File

@ -300,7 +300,7 @@ class ExternalService {
} }
} }
//} //}
destinationController.resetRogaining(); destinationController.resetRogaining(isgoal: true);
return res2; return res2;
} }