From 2934203b8b156d5ba12d8c4b16bb4a68e1afd6f3 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Mon, 14 Nov 2022 10:30:47 +0300 Subject: [PATCH] Chat Fixes --- lib/ui/chat/chat_detailed_screen.dart | 4 ++-- lib/ui/chat/chat_home_screen.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/chat/chat_detailed_screen.dart b/lib/ui/chat/chat_detailed_screen.dart index b9a7ea2..a6c0e67 100644 --- a/lib/ui/chat/chat_detailed_screen.dart +++ b/lib/ui/chat/chat_detailed_screen.dart @@ -92,7 +92,7 @@ class _ChatDetailScreenState extends State { if (userDetails != null) data.getSingleUserChatHistory(senderUID: AppState().chatDetails!.response!.id.toString(), receiverUID: userDetails["targetUser"].id, loadMore: false); return Scaffold( backgroundColor: const Color(0xFFF8F8F8), - appBar: AppBarWidget(context, title: userDetails["targetUser"].userName, showHomeButton: false, image: userDetails["targetUser"].image), + appBar: AppBarWidget(context, title: userDetails["targetUser"].userName.toString().replaceAll(".", " ").capitalizeFirstofEach, showHomeButton: false, image: userDetails["targetUser"].image), body: Consumer( builder: (BuildContext context, ChatProviderModel m, Widget? child) { return (m.isLoading @@ -149,7 +149,7 @@ class _ChatDetailScreenState extends State { height: 80, color: MyColors.black.withOpacity(0.10), child: ListTile( - title: (AppState().chatDetails!.response!.userName == m.repliedMsg.first.currentUserName.toString() ? "You" : m.repliedMsg.first.currentUserName.toString()) + title: (AppState().chatDetails!.response!.userName == m.repliedMsg.first.currentUserName.toString() ? "You" : m.repliedMsg.first.currentUserName.toString().replaceAll(".", " ")) .toText14(color: MyColors.lightGreenColor), subtitle: (m.repliedMsg.isNotEmpty ? m.repliedMsg.first.contant! : "").toText12(color: MyColors.white, maxLine: 2), trailing: GestureDetector( diff --git a/lib/ui/chat/chat_home_screen.dart b/lib/ui/chat/chat_home_screen.dart index b4483dc..879e390 100644 --- a/lib/ui/chat/chat_home_screen.dart +++ b/lib/ui/chat/chat_home_screen.dart @@ -167,7 +167,7 @@ class _ChatHomeScreenState extends State { context, AppRoutes.chatDetailed, arguments: {"targetUser": m.searchedChats![index]}, - ).then((value) { + ).then((Object? value) { m.clearSelections(); }); },