Fix: update destination limits to 3 and sync with Redis

This commit is contained in:
Hamza-Ayed
2026-06-27 17:49:03 +03:00
parent 5fed555e44
commit 43e3f8c939
13 changed files with 221 additions and 130 deletions

View File

@@ -77,13 +77,8 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
tooltip: 'Active Ride'.tr,
onTap: () async {
await checkForPendingOrderFromServer();
if (box.read(BoxName.rideArgumentsFromBackground) !=
if (box.read(BoxName.rideArgumentsFromBackground) ==
'failure') {
Get.to(
() => PassengerLocationMapPage(),
arguments: box.read(BoxName.rideArgumentsFromBackground),
);
} else {
MyDialog().getDialog(
'Ride info'.tr,
'you dont have accepted ride'.tr,
@@ -213,7 +208,7 @@ Future<void> checkForPendingOrderFromServer() async {
);
Log.print('response: $response');
if (response['status'] == 'success') {
if (response != 'failure') {
final Map<String, dynamic> orderInfo = response['message'];
final Map<String, dynamic> rideArgs =
_transformServerDataToAppArguments(orderInfo);
@@ -234,7 +229,7 @@ Future<void> checkForPendingOrderFromServer() async {
box.write(BoxName.rideArgumentsFromBackground, 'failure');
}
} catch (_) {
// silent
box.write(BoxName.rideArgumentsFromBackground, 'failure');
} finally {
_isCheckingPendingOrder = false;
}