Skip to content

Commit 5f19f0f

Browse files
authored
fix: truncate long contact name in favorites tile (WT-1051) (#1373)
1 parent afd1268 commit 5f19f0f

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

lib/features/favorites/widgets/favorite_tile.dart

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,18 @@ class _FavoriteTileState extends State<FavoriteTile> {
136136
dialogInfo: contact?.dialogInfo,
137137
),
138138
title: switch (presenceParams.hybridPresenceSupport) {
139-
true => Text('$name ${contact?.presenceInfo.primaryStatusIcon ?? ''}'),
140-
false => Text(name),
139+
true => Text(
140+
'$name ${contact?.presenceInfo.primaryStatusIcon ?? ''}',
141+
maxLines: 1,
142+
overflow: TextOverflow.ellipsis,
143+
),
144+
false => Text(name, maxLines: 1, overflow: TextOverflow.ellipsis),
141145
},
142-
subtitle: Text('${widget.favorite.label.capitalize}: ${widget.favorite.number}'),
146+
subtitle: Text(
147+
'${widget.favorite.label.capitalize}: ${widget.favorite.number}',
148+
maxLines: 1,
149+
overflow: TextOverflow.ellipsis,
150+
),
143151
onTap: widget.gesturesEnabled ? widget.onTap : null,
144152
onLongPress: widget.gesturesEnabled ? onLongPress : null,
145153
),

0 commit comments

Comments
 (0)