From c58e3956d6a3745917062dadd343302c398f2242 Mon Sep 17 00:00:00 2001 From: Haroon Amjad <> Date: Thu, 16 Jul 2026 23:54:07 +0300 Subject: [PATCH 1/3] Push notification changes & updates --- lib/core/utils/push_notification_handler.dart | 25 ++ .../notification_details_page.dart | 7 +- .../notifications_list_page.dart | 327 +++++++++--------- 3 files changed, 188 insertions(+), 171 deletions(-) diff --git a/lib/core/utils/push_notification_handler.dart b/lib/core/utils/push_notification_handler.dart index e179a1ab..89f6969a 100644 --- a/lib/core/utils/push_notification_handler.dart +++ b/lib/core/utils/push_notification_handler.dart @@ -19,7 +19,12 @@ import 'package:hmg_patient_app_new/core/api/api_client.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/cache_consts.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; +import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart'; +import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart'; +import 'package:hmg_patient_app_new/presentation/notifications/notification_details_page.dart'; +import 'package:hmg_patient_app_new/services/navigation_service.dart'; +import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:uuid/uuid.dart'; @@ -523,6 +528,26 @@ class PushNotificationHandler { _incomingCall(remoteMessage.data); // showCallkitIncoming(); } else { + NotificationResponseModel notification = NotificationResponseModel(); + + notification.createdOn = DateUtil.convertDateToString(DateTime.now()); + notification.isSentOn = DateUtil.convertDateToString(DateTime.now()); + notification.messageTypeData = remoteMessage.data['picture']; + notification.messageType = notification.messageTypeData != null && notification.messageTypeData!.isNotEmpty ? "image" : ""; + notification.message = remoteMessage.data['message']; + notification.notificationType = remoteMessage.data["NotificationType"].toString(); + if (remoteMessage.data["NotificationType"] == "2") { + notification.videoURL = remoteMessage.data["VideoUrl"]; + } + + Navigator.of(getIt.get().navigatorKey.currentContext!).push( + CustomPageRoute( + page: NotificationDetailsPage( + notification: notification, + ), + ), + ); + // GetNotificationsResponseModel notification = new GetNotificationsResponseModel(); // // notification.createdOn = DateUtil.convertDateToString(DateTime.now()); diff --git a/lib/presentation/notifications/notification_details_page.dart b/lib/presentation/notifications/notification_details_page.dart index ba78a298..70f87739 100644 --- a/lib/presentation/notifications/notification_details_page.dart +++ b/lib/presentation/notifications/notification_details_page.dart @@ -1,11 +1,13 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenshot_blocker/flutter_screenshot_blocker.dart'; +import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart'; +import 'package:hmg_patient_app_new/features/notifications/notifications_view_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; @@ -21,9 +23,10 @@ class NotificationDetailsPage extends StatelessWidget { @override Widget build(BuildContext context) { + getIt.get().markAsRead(notificationID: notification.id ?? 0); return ScreenshotBlockerWidget( - blockScreenshots: true, // makes this widget appear black in screenshots - detectScreenshots: true, // listen for screenshot attempts + blockScreenshots: true, // makes this widget appear black in screenshots + detectScreenshots: true, // listen for screenshot attempts onScreenshotDetected: (event) { // event.type → 'screenshot_taken' or 'screenshot_blocked' // ScaffoldMessenger.of(context).showSnackBar( diff --git a/lib/presentation/notifications/notifications_list_page.dart b/lib/presentation/notifications/notifications_list_page.dart index afea0fba..77f9a20a 100644 --- a/lib/presentation/notifications/notifications_list_page.dart +++ b/lib/presentation/notifications/notifications_list_page.dart @@ -49,187 +49,176 @@ class _NotificationsListPageState extends State { return CollapsingListView( title: LocaleKeys.notification.tr(context: context), child: Consumer(builder: (context, notificationsVM, child) { - return Column( - children: [ - Container( - margin: EdgeInsets.symmetric(vertical: 24.h), - decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, - borderRadius: 24.h, - hasShadow: false, - ), - child: ListView.builder( - itemCount: notificationsVM.isNotificationsLoading - ? 4 - // : notificationsVM.notificationsList.length + (notificationsVM.hasMoreNotifications ? 1 : 0), - : notificationsVM.notificationsList.length, - physics: NeverScrollableScrollPhysics(), - shrinkWrap: true, - padding: EdgeInsetsGeometry.zero, - itemBuilder: (context, index) { - if (notificationsVM.isNotificationsLoading) { - return LabResultItemView( - onTap: () {}, - labOrder: null, - index: index, - isLoading: true, - ); - } - return AnimationConfiguration.staggeredList( - position: index, - duration: const Duration(milliseconds: 500), - child: SlideAnimation( - verticalOffset: 100.0, - child: FadeInAnimation( - child: GestureDetector( - onTap: () { - notificationsVM.markAsRead(notificationID: notificationsVM.notificationsList[index].id ?? 0); + return Column( + children: [ + Container( + margin: EdgeInsets.symmetric(vertical: 24.h), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: AppColors.whiteColor, + borderRadius: 24.h, + hasShadow: false, + ), + child: ListView.builder( + itemCount: notificationsVM.isNotificationsLoading + ? 4 + // : notificationsVM.notificationsList.length + (notificationsVM.hasMoreNotifications ? 1 : 0), + : notificationsVM.notificationsList.length, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsetsGeometry.zero, + itemBuilder: (context, index) { + if (notificationsVM.isNotificationsLoading) { + return LabResultItemView( + onTap: () {}, + labOrder: null, + index: index, + isLoading: true, + ); + } + return AnimationConfiguration.staggeredList( + position: index, + duration: const Duration(milliseconds: 500), + child: SlideAnimation( + verticalOffset: 100.0, + child: FadeInAnimation( + child: GestureDetector( + onTap: () { + notificationsVM.markAsRead(notificationID: notificationsVM.notificationsList[index].id ?? 0); getIt.get().getPatientDashboard(); Navigator.push( - context, - MaterialPageRoute( - builder: (context) => NotificationDetailsPage( - notification: notificationsVM.notificationsList[index], + context, + MaterialPageRoute( + builder: (context) => NotificationDetailsPage( + notification: notificationsVM.notificationsList[index], + ), + ), + ); + }, + child: AnimatedContainer( + duration: Duration(milliseconds: 300), + curve: Curves.easeInOut, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 16.h), + // Message row with red dot for unread + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: notificationsVM.notificationsList[index].message!.toText16( + isBold: (notificationsVM.notificationsList[index].isRead == false), + weight: (notificationsVM.notificationsList[index].isRead == false) ? FontWeight.w600 : FontWeight.w400, + ), + ), + SizedBox(width: 8.w), + // Red dot for unread notifications ONLY + if (notificationsVM.notificationsList[index].isRead == false) + Container( + width: 8.w, + height: 8.w, + decoration: BoxDecoration( + color: Colors.red, + shape: BoxShape.circle, ), ), - ); - }, - child: AnimatedContainer( - duration: Duration(milliseconds: 300), - curve: Curves.easeInOut, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 16.h), - // Message row with red dot for unread - Row( - crossAxisAlignment: CrossAxisAlignment.start, + ], + ), + SizedBox(height: 12.h), + // First row: Time and Date chips with arrow + Row( + children: [ + // Time chip with clock icon + Container( + padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), + decoration: BoxDecoration( + color: AppColors.greyColor, + borderRadius: BorderRadius.circular(8), + ), + child: Directionality( + textDirection: ui.TextDirection.ltr, + child: Row( + mainAxisSize: MainAxisSize.min, children: [ - Expanded( - child: notificationsVM.notificationsList[index].message!.toText16( - isBold: (notificationsVM.notificationsList[index].isRead == false), - weight: (notificationsVM.notificationsList[index].isRead == false) - ? FontWeight.w600 - : FontWeight.w400, - ), - ), - SizedBox(width: 8.w), - // Red dot for unread notifications ONLY - if (notificationsVM.notificationsList[index].isRead == false) - Container( - width: 8.w, - height: 8.w, - decoration: BoxDecoration( - color: Colors.red, - shape: BoxShape.circle, - ), - ), + Icon(Icons.access_time, size: 12.w, color: AppColors.textColor), + SizedBox(width: 4.w), + _formatTime(notificationsVM.notificationsList[index].isSentOn).toText10(weight: FontWeight.w600, color: AppColors.textColor, isEnglishOnly: true), ], ), - SizedBox(height: 12.h), - // First row: Time and Date chips with arrow - Row( + ), + ), + SizedBox(width: 8.w), + // Date chip with calendar icon + Container( + padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), + decoration: BoxDecoration( + color: AppColors.greyColor, + borderRadius: BorderRadius.circular(8), + ), + child: Directionality( + textDirection: ui.TextDirection.ltr, + child: Row( + mainAxisSize: MainAxisSize.min, children: [ - // Time chip with clock icon - Container( - padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), - decoration: BoxDecoration( - color: AppColors.greyColor, - borderRadius: BorderRadius.circular(8), - ), - child: Directionality( - textDirection: ui.TextDirection.ltr, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon(Icons.access_time, size: 12.w, color: AppColors.textColor), - SizedBox(width: 4.w), - _formatTime(notificationsVM.notificationsList[index].isSentOn).toText10( - weight: FontWeight.w600, - color: AppColors.textColor, - isEnglishOnly: true - ), - ], - ), - ), - ), - SizedBox(width: 8.w), - // Date chip with calendar icon - Container( - padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), - decoration: BoxDecoration( - color: AppColors.greyColor, - borderRadius: BorderRadius.circular(8), - ), - child: Directionality( - textDirection: ui.TextDirection.ltr, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon(Icons.calendar_today, size: 12.w, color: AppColors.textColor), - SizedBox(width: 4.w), - _formatDate(notificationsVM.notificationsList[index].isSentOn).toText10( - weight: FontWeight.w600, - color: AppColors.textColor, - isEnglishOnly: true - ), - ], - ), - ), - ), - Spacer(), - // Arrow icon - Transform.flip( - flipX: getIt.get().isArabic(), - child: Utils.buildSvgWithAssets( - icon: AppAssets.arrow_forward, - width: 16.w, - height: 16.h, - iconColor: AppColors.greyTextColor, - ), - ), + Icon(Icons.calendar_today, size: 12.w, color: AppColors.textColor), + SizedBox(width: 4.w), + _formatDate(notificationsVM.notificationsList[index].isSentOn).toText10(weight: FontWeight.w600, color: AppColors.textColor, isEnglishOnly: true), ], ), - // Second row: Contains Image chip (if MessageType is "image") - if (notificationsVM.notificationsList[index].messageType != null && - notificationsVM.notificationsList[index].messageType!.toLowerCase() == "image") - Padding( - padding: EdgeInsets.only(top: 8.h), - child: Row( - children: [ - Container( - padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), - decoration: BoxDecoration( - color: AppColors.greyColor, - borderRadius: BorderRadius.circular(8), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon(Icons.image_outlined, size: 12.w, color: AppColors.textColor), - SizedBox(width: 4.w), - LocaleKeys.containsImage.toText10( - weight: FontWeight.w600, - color: AppColors.textColor, - ), - ], - ), - ), - ], - ), + ), + ), + Spacer(), + // Arrow icon + Transform.flip( + flipX: getIt.get().isArabic(), + child: Utils.buildSvgWithAssets( + icon: AppAssets.arrow_forward, + width: 16.w, + height: 16.h, + iconColor: AppColors.greyTextColor, + ), + ), + ], + ), + // Second row: Contains Image chip (if MessageType is "image") + if (notificationsVM.notificationsList[index].messageType != null && notificationsVM.notificationsList[index].messageType!.toLowerCase() == "image") + Padding( + padding: EdgeInsets.only(top: 8.h), + child: Row( + children: [ + Container( + padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), + decoration: BoxDecoration( + color: AppColors.greyColor, + borderRadius: BorderRadius.circular(8), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.image_outlined, size: 12.w, color: AppColors.textColor), + SizedBox(width: 4.w), + LocaleKeys.containsImage.toText10( + weight: FontWeight.w600, + color: AppColors.textColor, + ), + ], ), - SizedBox(height: 16.h), - 1.divider, + ), ], ), ), - ), - ), + SizedBox(height: 16.h), + 1.divider, + ], ), - ); - }).paddingSymmetrical(16.w, 0.h), - ).paddingSymmetrical(24.w, 0.h), - SizedBox(height: 16.h), + ), + ), + ), + ), + ); + }).paddingSymmetrical(16.w, 0.h), + ).paddingSymmetrical(24.w, 0.h), + SizedBox(height: 16.h), // SizedBox( // key: _bottomKey, // child: "Show more notifications".toText16( @@ -242,9 +231,9 @@ class _NotificationsListPageState extends State { // _scrollToBottom(); // }), SizedBox(height: 24.h), - ], - ); - }), + ], + ); + }), ); } From 09c31299257104bb2e6f977d1271916fa89a67fa Mon Sep 17 00:00:00 2001 From: Sultan khan Date: Sun, 19 Jul 2026 12:11:29 +0300 Subject: [PATCH 2/3] feedback file upload file name field added. --- .../contact_us/contact_us_view_model.dart | 34 +++++++++++++---- .../contact_us/feedback_page.dart | 37 +++++++++++-------- lib/widgets/attachment_options.dart | 3 +- 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/lib/features/contact_us/contact_us_view_model.dart b/lib/features/contact_us/contact_us_view_model.dart index 323eb782..40cab14c 100644 --- a/lib/features/contact_us/contact_us_view_model.dart +++ b/lib/features/contact_us/contact_us_view_model.dart @@ -15,6 +15,19 @@ import 'package:hmg_patient_app_new/services/error_handler_service.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; import 'package:permission_handler/permission_handler.dart'; +/// Class to store feedback attachment data +class FeedbackAttachment { + final String base64String; + final File file; + final String fileName; + + FeedbackAttachment({ + required this.base64String, + required this.file, + required this.fileName, + }); +} + class ContactUsViewModel extends ChangeNotifier { ContactUsRepo contactUsRepo; ErrorHandlerService errorHandlerService; @@ -35,7 +48,7 @@ class ContactUsViewModel extends ChangeNotifier { String? chatRequestID; - List feedbackAttachmentList = []; + List feedbackAttachmentList = []; List cocItemsList = []; bool isCOCItemsListLoading = false; @@ -168,13 +181,20 @@ class ContactUsViewModel extends ChangeNotifier { notifyListeners(); } - addFeedbackAttachment(String attachmentPath) { - feedbackAttachmentList.add(attachmentPath); + addFeedbackAttachment(String base64String, File file) { + // Extract filename from file path + final fileName = file.path.split('/').last; + + feedbackAttachmentList.add(FeedbackAttachment( + base64String: base64String, + file: file, + fileName: fileName, + )); notifyListeners(); } - removeFeedbackAttachment(String attachmentPath) { - feedbackAttachmentList.remove(attachmentPath); + removeFeedbackAttachment(FeedbackAttachment attachment) { + feedbackAttachmentList.remove(attachment); notifyListeners(); } @@ -282,7 +302,7 @@ class ContactUsViewModel extends ChangeNotifier { Future insertCOCItem({required String subject, required String message, Function(dynamic)? onSuccess, Function(String)? onError}) async { RequestInsertCOCItem requestInsertCOCItem = RequestInsertCOCItem(); - requestInsertCOCItem.attachment = feedbackAttachmentList.isNotEmpty ? feedbackAttachmentList.first : ""; + requestInsertCOCItem.attachment = feedbackAttachmentList.isNotEmpty ? feedbackAttachmentList.first.base64String : ""; requestInsertCOCItem.title = subject; requestInsertCOCItem.details = message; requestInsertCOCItem.cOCTypeName = selectedFeedbackType.id.toString(); @@ -291,7 +311,7 @@ class ContactUsViewModel extends ChangeNotifier { requestInsertCOCItem.isUserLoggedIn = true; requestInsertCOCItem.projectID = 0; requestInsertCOCItem.patientName = "${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}"; - requestInsertCOCItem.fileName = "Image 1"; + requestInsertCOCItem.fileName = feedbackAttachmentList.isNotEmpty ? feedbackAttachmentList.first.fileName : ""; requestInsertCOCItem.appVersion = ApiConsts.appVersionID; requestInsertCOCItem.uILanguage = appState.isArabic() ? "ar" : "en"; requestInsertCOCItem.browserInfo = Platform.localHostname; diff --git a/lib/presentation/contact_us/feedback_page.dart b/lib/presentation/contact_us/feedback_page.dart index 32359fef..251c720d 100644 --- a/lib/presentation/contact_us/feedback_page.dart +++ b/lib/presentation/contact_us/feedback_page.dart @@ -354,11 +354,10 @@ class FeedbackPage extends StatelessWidget { ImageOptions.showImageOptionsNew( context, true, - (String image, file) { - print(image); - print(file); - // Navigator.pop(context); - contactUsViewModel.addFeedbackAttachment(image); + (String base64Image, file) { + // base64Image: The base64-encoded image string + // file: The File object + contactUsViewModel.addFeedbackAttachment(base64Image, file); }, ); }, @@ -385,25 +384,31 @@ class FeedbackPage extends StatelessWidget { child: ListView.builder( padding: EdgeInsets.all(16.h), shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), itemCount: contactUsViewModel.feedbackAttachmentList.length, itemBuilder: (BuildContext context, int index) { + final attachment = contactUsViewModel.feedbackAttachmentList[index]; return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Icon( - Icons.attach_file, - color: Color(0xff2B353E), - ), - SizedBox(width: 8.w), - "Image ${index + 1}".toText14().paddingOnly(bottom: 8.h), - ], + Expanded( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + Icons.attach_file, + color: Color(0xff2B353E), + ), + SizedBox(width: 8.w), + Expanded( + child: attachment.fileName.toText14().paddingOnly(bottom: 8.h), + ), + ], + ), ), Utils.buildSvgWithAssets(icon: AppAssets.cancel_circle_icon).onPress(() { - contactUsViewModel.removeFeedbackAttachment(contactUsViewModel.feedbackAttachmentList[index]); + contactUsViewModel.removeFeedbackAttachment(attachment); }), ], ); diff --git a/lib/widgets/attachment_options.dart b/lib/widgets/attachment_options.dart index bbc0bc6d..db4164a3 100644 --- a/lib/widgets/attachment_options.dart +++ b/lib/widgets/attachment_options.dart @@ -48,7 +48,8 @@ class AttachmentOptions extends StatelessWidget { ).onPress(() async { await onGalleryTap(); }), - if (!showFilesOption) SizedBox(height: 16.h), + // if (!showFilesOption) commented because the ui issue. + SizedBox(height: 16.h), if (showFilesOption) checkInOptionCard( appState, From ea0c643ce84e398eb5758cfa74ab3008b6e134de Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 20 Jul 2026 15:14:21 +0300 Subject: [PATCH 3/3] updates --- lib/core/api_consts.dart | 4 ++-- lib/core/services/turnstile_service.dart | 4 ++++ lib/features/authentication/authentication_view_model.dart | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 2c64b13e..8f2deaa3 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -5,7 +5,7 @@ import 'package:hmg_patient_app_new/core/enums.dart'; class ApiConsts { static const maxSmallScreen = 660; - static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; + static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT @@ -301,7 +301,7 @@ class ApiConsts { static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations"; // ************ static values for Api **************** - static final double appVersionID = 21.6; + static final double appVersionID = 21.7; // static final double appVersionID = 50.7; static final int appChannelId = 3; diff --git a/lib/core/services/turnstile_service.dart b/lib/core/services/turnstile_service.dart index f6665190..b30113e0 100644 --- a/lib/core/services/turnstile_service.dart +++ b/lib/core/services/turnstile_service.dart @@ -18,6 +18,10 @@ class TurnstileService { // Initialize an instance of invisible Cloudflare Turnstile with your site key final turnstile = CloudflareTurnstile.invisible( siteKey: _siteKey, + onTimeout: () {}, + options: TurnstileOptions( + retryInterval: const Duration(milliseconds: 2000), + ), ); try { diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index 6ec5d2bf..16b84d15 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -998,7 +998,10 @@ class AuthenticationViewModel extends ChangeNotifier { sendActivationCodeReq: request, isRegister: checkIsUserComingForRegister(request: payload), languageID: 'er', isFormFamilyFile: isFormFamilyFile); resultEither.fold( - (failure) async => await _errorHandlerService.handleError(failure: failure), + (failure) async { + LoaderBottomSheet.hideLoader(); + await _errorHandlerService.handleError(failure: failure); + }, (apiResponse) async { if (isFormFamilyFile) { if (apiResponse.data['PatientShareRequestID'] != null && apiResponse.data['PatientShareRequestID'] == 0 && apiResponse.messageStatus == 1) {