From 8c5d046586384af2e0f2046bfcf361c53401cfb8 Mon Sep 17 00:00:00 2001 From: "khaled.njim" Date: Mon, 16 Dec 2024 14:32:09 +0100 Subject: [PATCH] fixup! TW-2144 Update search result list item --- lib/pages/chat_search/chat_search_view.dart | 93 ++++++++++----------- pubspec.lock | 4 +- pubspec.yaml | 2 +- 3 files changed, 48 insertions(+), 51 deletions(-) diff --git a/lib/pages/chat_search/chat_search_view.dart b/lib/pages/chat_search/chat_search_view.dart index b4bc3f43b..46f6cd2c7 100644 --- a/lib/pages/chat_search/chat_search_view.dart +++ b/lib/pages/chat_search/chat_search_view.dart @@ -201,62 +201,59 @@ class _SearchItem extends StatelessWidget { future: event.fetchSenderUser(), builder: (context, snapshot) { final user = snapshot.data ?? event.senderFromMemoryOrFallback; - return Container( - padding: ChatSearchStyle.itemMargin, + return TwakeListItem( height: ChatSearchStyle.itemHeight, + padding: ChatSearchStyle.itemMargin, child: TwakeInkWell( onTap: () => onTap(event), - child: TwakeListItem( - child: Row( - children: [ - Padding( - padding: ChatSearchStyle.avatarPadding, - child: Avatar( - mxContent: user.avatarUrl, - name: user.calcDisplayname(), - ), + child: Row( + children: [ + Padding( + padding: ChatSearchStyle.avatarPadding, + child: Avatar( + mxContent: user.avatarUrl, + name: user.calcDisplayname(), ), - Expanded( - child: Container( - margin: ChatSearchStyle.itemPadding, - height: ChatSearchStyle.itemHeight, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Row( - children: [ - Expanded( - child: Text( - user.id == Matrix.of(context).client.userID - ? L10n.of(context)!.you - : user.calcDisplayname(), - maxLines: 1, - style: ListItemStyle.titleTextStyle( - fontFamily: 'Inter', - ), + ), + Expanded( + child: Container( + margin: ChatSearchStyle.itemPadding, + height: ChatSearchStyle.itemHeight, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Text( + user.id == Matrix.of(context).client.userID + ? L10n.of(context)!.you + : user.calcDisplayname(), + maxLines: 1, + style: ListItemStyle.titleTextStyle( + fontFamily: 'Inter', ), ), - Text( - event.originServerTs - .localizedTimeShort(context), - style: Theme.of(context) - .textTheme - .labelMedium - ?.copyWith( - color: LinagoraRefColors.material() - .tertiary[30], - ), - ), - ], - ), - _MessageContent(event: event, searchWord: searchWord), - ], - ), + ), + Text( + event.originServerTs.localizedTimeShort(context), + style: Theme.of(context) + .textTheme + .labelMedium + ?.copyWith( + color: LinagoraRefColors.material() + .tertiary[30], + ), + ), + ], + ), + _MessageContent(event: event, searchWord: searchWord), + ], ), ), - ], - ), + ), + ], ), ), ); diff --git a/pubspec.lock b/pubspec.lock index 603291dfe..64ddb8e4c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1778,8 +1778,8 @@ packages: dependency: "direct main" description: path: "." - ref: master - resolved-ref: f5e0f2d0f9450dda58c72233f72fb48cf7d2769b + ref: add_padding_attribute_in_twakeListItem + resolved-ref: "0752427cdf79bbadba21a65a2045787b7f2d90d9" url: "git@github.com:linagora/linagora-design-flutter.git" source: git version: "0.0.1" diff --git a/pubspec.yaml b/pubspec.yaml index 28f07cbd4..7c85b1aa9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,7 +29,7 @@ dependencies: linagora_design_flutter: git: url: git@github.com:linagora/linagora-design-flutter.git - ref: master + ref: add_padding_attribute_in_twakeListItem flutter_matrix_html: git: url: https://github.com/linagora/flutter_matrix_html.git