Update: 2026-06-26 04:31:50

This commit is contained in:
Hamza-Ayed
2026-06-26 04:31:50 +03:00
parent 72afd11a57
commit 116f08d367

View File

@@ -487,9 +487,11 @@ class RideLifecycleController extends GetxController {
case RideState.searching:
if (rideId == 'yet' || rideId.isEmpty) break;
// إذا كان WebSocket متصلاً ونشطاً، نعتمد عليه ولا نبول
if (mapSocket.isSocketConnected) break;
try {
String statusFromServer = await getRideStatus(rideId);
if (statusFromServer == 'Apply' || statusFromServer == 'Applied') {
final statusResult = await getRideStatus(rideId);
if (statusResult == 'Apply' || statusResult == 'Applied') {
await processRideAcceptance(source: "Polling");
break;
}
@@ -3799,9 +3801,15 @@ class RideLifecycleController extends GetxController {
final response = await CRUD().get(
link: "${AppLink.rideServerSide}/ride/rides/getRideStatus.php",
payload: {'id': rideId});
Log.print(response);
Log.print('2176');
return response['data'];
Log.print("📡 getRideStatus raw response: $response");
if (response is Map<String, dynamic>) {
final data = response['data'];
if (data is String) return data;
Log.print("⚠️ getRideStatus: data is not a String, got: ${data.runtimeType}");
} else {
Log.print("⚠️ getRideStatus: response is not a Map, got: ${response.runtimeType}");
}
return '';
}
void handleActiveRideOnStartup(dynamic data) {