Chat Fixes

merge-requests/55/head
Sikander Saleem 2 years ago
parent 2fe41977d8
commit 2934203b8b

@ -92,7 +92,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
if (userDetails != null) data.getSingleUserChatHistory(senderUID: AppState().chatDetails!.response!.id.toString(), receiverUID: userDetails["targetUser"].id, loadMore: false); if (userDetails != null) data.getSingleUserChatHistory(senderUID: AppState().chatDetails!.response!.id.toString(), receiverUID: userDetails["targetUser"].id, loadMore: false);
return Scaffold( return Scaffold(
backgroundColor: const Color(0xFFF8F8F8), 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<ChatProviderModel>( body: Consumer<ChatProviderModel>(
builder: (BuildContext context, ChatProviderModel m, Widget? child) { builder: (BuildContext context, ChatProviderModel m, Widget? child) {
return (m.isLoading return (m.isLoading
@ -149,7 +149,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
height: 80, height: 80,
color: MyColors.black.withOpacity(0.10), color: MyColors.black.withOpacity(0.10),
child: ListTile( 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), .toText14(color: MyColors.lightGreenColor),
subtitle: (m.repliedMsg.isNotEmpty ? m.repliedMsg.first.contant! : "").toText12(color: MyColors.white, maxLine: 2), subtitle: (m.repliedMsg.isNotEmpty ? m.repliedMsg.first.contant! : "").toText12(color: MyColors.white, maxLine: 2),
trailing: GestureDetector( trailing: GestureDetector(

@ -167,7 +167,7 @@ class _ChatHomeScreenState extends State<ChatHomeScreen> {
context, context,
AppRoutes.chatDetailed, AppRoutes.chatDetailed,
arguments: {"targetUser": m.searchedChats![index]}, arguments: {"targetUser": m.searchedChats![index]},
).then((value) { ).then((Object? value) {
m.clearSelections(); m.clearSelections();
}); });
}, },

Loading…
Cancel
Save