Skip to content

Commit

Permalink
fixup! TW-2144 Update search result list item
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaledNjim committed Dec 16, 2024
1 parent cafbd79 commit 8c5d046
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 51 deletions.
93 changes: 45 additions & 48 deletions lib/pages/chat_search/chat_search_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
],
),
),
],
),
),
],
),
),
);
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]:linagora/linagora-design-flutter.git"
source: git
version: "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies:
linagora_design_flutter:
git:
url: [email protected]: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
Expand Down

0 comments on commit 8c5d046

Please sign in to comment.