From f8ae5b0987f8167e42ad333871c66fb19bd8a140 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Thu, 19 Jan 2023 15:53:49 +0300 Subject: [PATCH] mark attendance session expire fixed --- lib/api/chat/chat_api_client.dart | 6 ------ lib/provider/chat_provider_model.dart | 16 ++++++++-------- lib/ui/chat/chat_detailed_screen.dart | 5 ++++- pubspec.yaml | 2 +- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/lib/api/chat/chat_api_client.dart b/lib/api/chat/chat_api_client.dart index b408362..210106e 100644 --- a/lib/api/chat/chat_api_client.dart +++ b/lib/api/chat/chat_api_client.dart @@ -35,12 +35,6 @@ class ChatApiClient { }, ); - print({ - "employeeNumber": AppState().memberInformationList!.eMPLOYEENUMBER.toString(), - "password": "FxIu26rWIKoF8n6mpbOmAjDLphzFGmpG" - // "isMobile": true, - // "deviceToken": AppState().deviceNotificationToken - }); if (!kReleaseMode) { logger.i("login-res: " + response.body); } diff --git a/lib/provider/chat_provider_model.dart b/lib/provider/chat_provider_model.dart index c0a16c0..71d7ccb 100644 --- a/lib/provider/chat_provider_model.dart +++ b/lib/provider/chat_provider_model.dart @@ -1415,17 +1415,17 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin { void inputBoxDirection(String val) { if (val.isNotEmpty) { isTextMsg = true; + RegExp exp = RegExp("[a-zA-Z]"); + if (exp.hasMatch(val.substring(val.length - 1)) && val.substring(val.length - 1) != " ") { + textDirection = Material.TextDirection.ltr; + notifyListeners(); + } else if (val.substring(val.length - 1) != " " && !exp.hasMatch(val.substring(val.length - 1))) { + textDirection = Material.TextDirection.rtl; + notifyListeners(); + } } else { isTextMsg = false; } - RegExp exp = RegExp("[a-zA-Z]"); - if (exp.hasMatch(val.substring(val.length - 1)) && val.substring(val.length - 1) != " ") { - textDirection = Material.TextDirection.ltr; - notifyListeners(); - } else if (val.substring(val.length - 1) != " " && !exp.hasMatch(val.substring(val.length - 1))) { - textDirection = Material.TextDirection.rtl; - notifyListeners(); - } } Material.TextDirection getTextDirection(String v) { diff --git a/lib/ui/chat/chat_detailed_screen.dart b/lib/ui/chat/chat_detailed_screen.dart index da547cf..a72e12b 100644 --- a/lib/ui/chat/chat_detailed_screen.dart +++ b/lib/ui/chat/chat_detailed_screen.dart @@ -256,7 +256,10 @@ class _ChatDetailScreenState extends State { textDirection: m.textDirection, controller: m.message, decoration: InputDecoration( - hintText: m.isAttachmentMsg ? m.selectedFile.path.split("/").last : LocaleKeys.typeheretoreply.tr(), + hintTextDirection: m.textDirection, + hintText: m.isAttachmentMsg + ? m.selectedFile.path.split("/").last + : m.textDirection.name == "rtl" ? "اكتب هنا للرد" :LocaleKeys.typeheretoreply.tr(), hintStyle: TextStyle(color: m.isAttachmentMsg ? MyColors.darkTextColor : MyColors.grey98Color, fontSize: 14), border: InputBorder.none, focusedBorder: InputBorder.none, diff --git a/pubspec.yaml b/pubspec.yaml index c343421..b3d6c4c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -108,7 +108,7 @@ dependencies: dependency_overrides: - #firebase_core_platform_interface: 4.5.1 + firebase_core_platform_interface: 4.5.1 dev_dependencies: