Localize Empty Chat

This commit is contained in:
Christian Pauly 2020-02-16 08:46:45 +01:00
parent 8d4469ebde
commit 83b7b0cbea

View file

@ -10,6 +10,12 @@ extension LocalizedRoomDisplayname on Room {
(this.mHeroes != null && this.mHeroes.isNotEmpty)) {
return I18n.of(context).groupWith(this.displayname);
}
if ((this.name?.isEmpty ?? true) &&
(this.canonicalAlias?.isEmpty ?? true) &&
!this.isDirectChat &&
(this.mHeroes?.isEmpty ?? true)) {
return I18n.of(context).emptyChat;
}
return this.displayname;
}
}