Update: 2026-07-23 22:14:10
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user