updated for retain rogainin after goal
This commit is contained in:
@ -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;
|
||||||
|
|
||||||
|
if (isgoal == false) {
|
||||||
await db.deleteAllDestinations();
|
await db.deleteAllDestinations();
|
||||||
await db.deleteAllRogaining();
|
await db.deleteAllRogaining();
|
||||||
|
}
|
||||||
|
|
||||||
int? latgoal = await db.latestGoal();
|
int? latgoal = await db.latestGoal();
|
||||||
if (latgoal != null) {
|
if (latgoal != null) {
|
||||||
|
|||||||
@ -300,7 +300,7 @@ class ExternalService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
destinationController.resetRogaining();
|
destinationController.resetRogaining(isgoal: true);
|
||||||
return res2;
|
return res2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user