Update: 2026-07-23 22:14:10

This commit is contained in:
Hamza-Ayed
2026-07-23 22:14:10 +03:00
parent 695d6d7cb2
commit e7629a9eb9
8 changed files with 131 additions and 13 deletions
@@ -134,10 +134,6 @@ class FirebaseMessagesController extends GetxController {
switch (category) {
case 'ORDER':
case 'Order': // Handle both cases for backward compatibility
// if (Platform.isAndroid) {
// notificationController.showNotification(title, body, 'order', '');
// }
// 🔥 [Fix FCM-Guard] منع إعاقة الرحلة النشطة بطلبات جديدة عبر FCM
String currentRideStatus = box.read(BoxName.rideStatus) ?? '';
if (currentRideStatus == 'Begin' ||
@@ -150,6 +146,11 @@ class FirebaseMessagesController extends GetxController {
var myListString = message.data['DriverList'];
if (myListString != null) {
if (Platform.isAndroid) {
notificationController.showOrderNotification(
title, body, 'ding.wav', myListString);
}
var myList = jsonDecode(myListString) as List<dynamic>;
driverToken = myList[14].toString();
Get.put(HomeCaptainController(), permanent: true).changeRideId();