From 9b5a3cadce2dfff70e5b0c52eb114fff12f11388 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 16 Jan 2021 21:44:34 +0100 Subject: [PATCH] fix: Typing update --- lib/views/chat.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/views/chat.dart b/lib/views/chat.dart index d984e618..ed299840 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -469,8 +469,6 @@ class _ChatState extends State { if (room.membership == Membership.invite) { showFutureLoadingDialog(context: context, future: () => room.join()); } - - final typingText = room.getLocalizedTypingText(context); return Scaffold( appBar: AppBar( leading: selectMode @@ -482,7 +480,7 @@ class _ChatState extends State { titleSpacing: AdaptivePageLayout.of(context).columnMode(context) ? null : 0, title: selectedEvents.isEmpty - ? StreamBuilder( + ? StreamBuilder( stream: room.onUpdate.stream, builder: (context, snapshot) => ListTile( leading: Avatar(room.avatar, room.displayname), @@ -508,7 +506,7 @@ class _ChatState extends State { room.getLocalizedDisplayname( MatrixLocals(L10n.of(context))), maxLines: 1), - subtitle: typingText.isEmpty + subtitle: room.getLocalizedTypingText(context).isEmpty ? StreamBuilder( stream: Matrix.of(context) .client @@ -527,7 +525,7 @@ class _ChatState extends State { size: 13), SizedBox(width: 4), Text( - typingText, + room.getLocalizedTypingText(context), maxLines: 1, style: TextStyle( color: Theme.of(context).primaryColor,