Fix JWT validation: use user_id instead of sub in socket servers, revert statusDriverLocation from toggleActive

This commit is contained in:
Hamza-Ayed
2026-08-01 17:57:47 +03:00
parent 1ddc6f8aa7
commit 77d7d9faf8
4 changed files with 3 additions and 6 deletions
@@ -387,7 +387,6 @@ 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,7 +411,6 @@ class HomeCaptainController extends GetxController {
update();
});
} else {
box.write(BoxName.statusDriverLocation, 'off');
locationController.stopLocationUpdates();
activeStartTime = null;
activeTimer?.cancel();
@@ -427,7 +425,6 @@ class HomeCaptainController extends GetxController {
update();
}
} else {
box.write(BoxName.statusDriverLocation, 'off');
locationController.stopLocationUpdates();
activeStartTime = null;
activeTimer?.cancel();