Fix payment server: remove global conRide to prevent crashing non-ride DB queries
This commit is contained in:
@@ -32,8 +32,7 @@ class HomeCaptainController extends GetxController {
|
||||
Timer? activeTimer;
|
||||
Map data = {};
|
||||
bool isHomeMapActive = true;
|
||||
InlqBitmap carIcon =
|
||||
InlqBitmap.fromStyleImage('car_icon', size: 2.3);
|
||||
InlqBitmap carIcon = InlqBitmap.fromStyleImage('car_icon', size: 2.3);
|
||||
bool isMapReadyForCommands = false;
|
||||
bool isLoading = true;
|
||||
late double kazan = 0;
|
||||
@@ -388,6 +387,7 @@ class HomeCaptainController extends GetxController {
|
||||
_checkFatigueBeforeOnline(); // Throws exception if tired
|
||||
|
||||
if (double.parse(totalPoints) > minPointsThreshold) {
|
||||
box.write(BoxName.statusDriverLocation, 'on');
|
||||
locationController.startLocationUpdates();
|
||||
HapticFeedback.heavyImpact();
|
||||
activeStartTime = DateTime.now();
|
||||
@@ -412,6 +412,7 @@ class HomeCaptainController extends GetxController {
|
||||
update();
|
||||
});
|
||||
} else {
|
||||
box.write(BoxName.statusDriverLocation, 'off');
|
||||
locationController.stopLocationUpdates();
|
||||
activeStartTime = null;
|
||||
activeTimer?.cancel();
|
||||
@@ -426,6 +427,7 @@ class HomeCaptainController extends GetxController {
|
||||
update();
|
||||
}
|
||||
} else {
|
||||
box.write(BoxName.statusDriverLocation, 'off');
|
||||
locationController.stopLocationUpdates();
|
||||
activeStartTime = null;
|
||||
activeTimer?.cancel();
|
||||
|
||||
Reference in New Issue
Block a user