bug fixes

This commit is contained in:
Mohamed Nouffer
2023-08-23 17:33:26 +05:30
parent 08332d45d4
commit c41dde4c33
4 changed files with 68 additions and 53 deletions

View File

@ -131,6 +131,62 @@ class DestinationController extends GetxController {
}
}
void CallforCheckin(Destination d){
bool auto_checkin = d.auto_checkin == 0 ? false : true;
if(auto_checkin){
if(!checking_in){
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make checkin ${d.sub_loc_id}@@@@@@@@@@@");
makeCheckin(d, true,"");
if(d.cp != -1){
rogaining_counted.value =true;
}
skip_gps = false;
}
}
else{
print("--- hidden loc ${d.hidden_location} ----");
// ask for checkin
if(d.hidden_location != null && d.hidden_location == 0 && is_in_rog.value == true && d.cp != -1){
chekcs = 3;
is_in_checkin.value = true;
photos.clear();
showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => CameraPage(destination: d,))
).whenComplete((){
skip_gps = false;
rogaining_counted.value =true;
chekcs = 0;
is_in_checkin.value = false;
});
}
else{
Get.snackbar("始まっていない", "ロゲイニングを始める必要があります");
}
//else if(is_in_rog.value == true && d.cp != -1){
// chekcs = 4;
// is_in_checkin.value = true;
// showMaterialModalBottomSheet(
// expand: true,
// context: Get.context!,
// backgroundColor: Colors.transparent,
// builder: (context) => BottomSheetNew()
// ).whenComplete(() {
// skip_gps = false;
// chekcs = 0;
// is_in_checkin.value = false;
// });
// showModalBottomSheet(context: Get.context!, isScrollControlled: true,
// builder:((context) => BottomSheetNew())
// ).whenComplete((){
// skip_gps = false;
// chekcs = 0;
// is_in_checkin.value = false;
// });
//}
}
}
void startTimer(Destination d, double distance) async {
print("=== passed dest is ${d.location_id} ${d.checkedin} ====");
skip_gps = true;
@ -204,55 +260,7 @@ class DestinationController extends GetxController {
print("---- location checkin radious ${d.checkin_radious} ----");
print("---- already checked in ${location_already_checked_in} ----");
if(checkin_radious >= distance && location_already_checked_in == false && is_in_rog.value == true){
if(auto_checkin){
if(!checking_in){
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make checkin ${d.sub_loc_id}@@@@@@@@@@@");
makeCheckin(d, true,"");
if(d.cp != -1){
rogaining_counted.value =true;
}
skip_gps = false;
}
}
else{
print("--- hidden loc ${d.hidden_location} ----");
// ask for checkin
if(d.hidden_location != null && d.hidden_location == 0 && is_in_rog.value == true && d.cp != -1){
chekcs = 3;
is_in_checkin.value = true;
photos.clear();
showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => CameraPage(destination: d,))
).whenComplete((){
skip_gps = false;
rogaining_counted.value =true;
chekcs = 0;
is_in_checkin.value = false;
});
}
else if(is_in_rog.value == true && d.cp != -1){
chekcs = 4;
is_in_checkin.value = true;
showMaterialModalBottomSheet(
expand: true,
context: Get.context!,
backgroundColor: Colors.transparent,
builder: (context) => BottomSheetNew()
).whenComplete(() {
skip_gps = false;
chekcs = 0;
is_in_checkin.value = false;
});
// showModalBottomSheet(context: Get.context!, isScrollControlled: true,
// builder:((context) => BottomSheetNew())
// ).whenComplete((){
// skip_gps = false;
// chekcs = 0;
// is_in_checkin.value = false;
// });
}
}
CallforCheckin(d);
}
print("---- cp --- ${d.cp} -----");
print("--- at goal ${is_at_goal} ---");