diff --git a/lib/pages/chat_list/chat_list.dart b/lib/pages/chat_list/chat_list.dart index d306111d63..8fe838aec2 100644 --- a/lib/pages/chat_list/chat_list.dart +++ b/lib/pages/chat_list/chat_list.dart @@ -225,6 +225,7 @@ class ChatListController extends State Future actionWithToggleSelectMode(Function action) async { await action(); toggleSelectMode(); + _clearSelectionItem(); } void _clearSelectionItem() { diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index 6c75cba2a0..9e980bc327 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -107,6 +107,7 @@ class ChatListItem extends StatelessWidget with ChatListItemMixin { onSecondaryTap: onSecondaryTap, onLongPress: onLongPress, child: Container( + height: ChatListItemStyle.chatItemHeight, padding: ChatListItemStyle.paddingBody, child: Row( children: [ diff --git a/lib/pages/chat_list/chat_list_item_style.dart b/lib/pages/chat_list/chat_list_item_style.dart index effb7f8d86..a255fce456 100644 --- a/lib/pages/chat_list/chat_list_item_style.dart +++ b/lib/pages/chat_list/chat_list_item_style.dart @@ -10,6 +10,8 @@ class ChatListItemStyle { static const double mentionIconWidth = 20; + static const double chatItemHeight = 85; + static double unreadBadgeSize( bool unread, bool hasNewMessages, diff --git a/lib/pages/chat_list/chat_list_item_subtitle.dart b/lib/pages/chat_list/chat_list_item_subtitle.dart index 826341d138..583bcefc52 100644 --- a/lib/pages/chat_list/chat_list_item_subtitle.dart +++ b/lib/pages/chat_list/chat_list_item_subtitle.dart @@ -31,14 +31,7 @@ class ChatListItemSubtitle extends StatelessWidget with ChatListItemMixin { children: [ Expanded( child: typingText.isNotEmpty - ? Column( - children: [ - Flexible( - child: typingTextWidget(typingText, context), - ), - const Spacer(), - ], - ) + ? typingTextWidget(typingText, context) : (isGroup ? chatListItemSubtitleForGroup( room: room, diff --git a/lib/presentation/mixins/chat_list_item_mixin.dart b/lib/presentation/mixins/chat_list_item_mixin.dart index d25c525a7a..76de1b395b 100644 --- a/lib/presentation/mixins/chat_list_item_mixin.dart +++ b/lib/presentation/mixins/chat_list_item_mixin.dart @@ -42,26 +42,18 @@ mixin ChatListItemMixin { ); } - Row typingTextWidget(String typingText, BuildContext context) { + Widget typingTextWidget(String typingText, BuildContext context) { final displayedTypingText = "~ $typingText…"; - return Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Flexible( - child: Text( - displayedTypingText, - style: Theme.of(context).textTheme.labelLarge?.merge( - TextStyle( - overflow: TextOverflow.ellipsis, - color: Theme.of(context).colorScheme.primary, - ), - ), - maxLines: 2, - softWrap: true, + return Text( + displayedTypingText, + style: Theme.of(context).textTheme.labelLarge?.merge( + TextStyle( + overflow: TextOverflow.ellipsis, + color: Theme.of(context).colorScheme.primary, + ), ), - ), - ], + maxLines: 2, + softWrap: true, ); }