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,