Update: 2026-06-25 02:28:33
This commit is contained in:
@@ -26,11 +26,9 @@ class PassengerNotificationController extends GetxController {
|
||||
Get.back();
|
||||
});
|
||||
} else {
|
||||
final decoded = jsonDecode(res);
|
||||
// التحقق من وجود البيانات في 'data' أو 'message'
|
||||
var rawData = decoded['data'] ?? decoded['message'];
|
||||
var rawData = res['data'] ?? res['message'];
|
||||
|
||||
if (decoded['status'] == 'error' || decoded['status'] == 'failure' || rawData == "No notification data found") {
|
||||
if (res['status'] == 'error' || res['status'] == 'failure' || rawData == "No notification data found") {
|
||||
notificationData = {'status': 'success', 'message': []}; // قائمة فارغة لمنع الخطأ في UI
|
||||
} else {
|
||||
// التأكد أننا نخزن قائمة
|
||||
|
||||
Reference in New Issue
Block a user