Skip to content

Commit 67393c9

Browse files
committed
profile: Distinguish muted users in custom profile fields of type User
1 parent 7f1136d commit 67393c9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/widgets/profile.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ class _UserWidget extends StatelessWidget {
263263
@override
264264
Widget build(BuildContext context) {
265265
final store = PerAccountStoreWidget.of(context);
266+
final localizations = ZulipLocalizations.of(context);
267+
final isMuted = store.isUserMuted(userId);
266268
return InkWell(
267269
onTap: () => Navigator.push(context,
268270
ProfilePage.buildRoute(context: context,
@@ -271,10 +273,12 @@ class _UserWidget extends StatelessWidget {
271273
padding: const EdgeInsets.all(8),
272274
child: Row(children: [
273275
// TODO(#196) render active status
274-
Avatar(userId: userId, size: 32, borderRadius: 32 / 8),
276+
Avatar(userId: userId, size: 32, borderRadius: 32 / 8,
277+
showAsMuted: isMuted),
275278
const SizedBox(width: 8),
276279
Expanded(
277-
child: Text(store.userDisplayName(userId),
280+
child: Text(
281+
isMuted ? localizations.mutedUser : store.userDisplayName(userId),
278282
style: _TextStyles.customProfileFieldText)),
279283
])));
280284
}

0 commit comments

Comments
 (0)