From 83b7b0cbeaa84fd9c01c7bf0b421d855438c0e39 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 16 Feb 2020 08:46:45 +0100 Subject: [PATCH] Localize Empty Chat --- lib/utils/room_extension.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/utils/room_extension.dart b/lib/utils/room_extension.dart index 5d60ed1c..6f62c994 100644 --- a/lib/utils/room_extension.dart +++ b/lib/utils/room_extension.dart @@ -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; } }