@@ -417,8 +417,7 @@ class MessageListAppBarTitle extends StatelessWidget {
417
417
if (otherRecipientIds.isEmpty) {
418
418
return Text (zulipLocalizations.dmsWithYourselfPageTitle);
419
419
} else {
420
- final names = otherRecipientIds.map (
421
- (id) => store.users[id]? .fullName ?? zulipLocalizations.unknownUserName);
420
+ final names = otherRecipientIds.map (store.userDisplayName);
422
421
// TODO show avatars
423
422
return Text (
424
423
zulipLocalizations.dmsWithOthersPageTitle (names.join (', ' )));
@@ -756,10 +755,10 @@ class _TypingStatusWidgetState extends State<TypingStatusWidget> with PerAccount
756
755
if (typistIds.isEmpty) return const SizedBox ();
757
756
final text = switch (typistIds.length) {
758
757
1 => localizations.onePersonTyping (
759
- store.users[ typistIds.first] ? .fullName ?? localizations.unknownUserName ),
758
+ store.userDisplayName ( typistIds.first) ),
760
759
2 => localizations.twoPeopleTyping (
761
- store.users[ typistIds.first] ? .fullName ?? localizations.unknownUserName ,
762
- store.users[ typistIds.last] ? .fullName ?? localizations.unknownUserName ),
760
+ store.userDisplayName ( typistIds.first) ,
761
+ store.userDisplayName ( typistIds.last) ),
763
762
_ => localizations.manyPeopleTyping,
764
763
};
765
764
@@ -1159,7 +1158,7 @@ class DmRecipientHeader extends StatelessWidget {
1159
1158
if (message.allRecipientIds.length > 1 ) {
1160
1159
title = zulipLocalizations.messageListGroupYouAndOthers (message.allRecipientIds
1161
1160
.where ((id) => id != store.selfUserId)
1162
- .map ((id) => store.users[id] ? .fullName ?? zulipLocalizations.unknownUserName )
1161
+ .map (store.userDisplayName )
1163
1162
.sorted ()
1164
1163
.join (", " ));
1165
1164
} else {
0 commit comments