Update lib/src/room.dart

This commit is contained in:
Christian Pauly 2020-05-14 07:21:52 +00:00
parent aa8cdb10b0
commit 7485637340

View file

@ -294,18 +294,10 @@ class Room {
(mHeroes != null && mHeroes.isNotEmpty)) { (mHeroes != null && mHeroes.isNotEmpty)) {
return i18n.groupWith(displayname); return i18n.groupWith(displayname);
} }
if ((name?.isEmpty ?? true) && if (displayname?.isNotEmpty ?? false) {
(canonicalAlias?.isEmpty ?? true) && return displayname;
!isDirectChat &&
(mHeroes?.isEmpty ?? true)) {
if (membership == Membership.invite) {
final sender =
getState('m.room.member', client.userID)?.sender?.calcDisplayname();
if (sender != null) return sender;
}
return i18n.emptyChat;
} }
return displayname; return i18n.emptyChat;
} }
/// The topic of the room if set by a participant. /// The topic of the room if set by a participant.