fix: Typing update

This commit is contained in:
Christian Pauly 2021-01-16 21:44:34 +01:00
parent d27dbe0b93
commit 9b5a3cadce

View File

@ -469,8 +469,6 @@ class _ChatState extends State<Chat> {
if (room.membership == Membership.invite) { if (room.membership == Membership.invite) {
showFutureLoadingDialog(context: context, future: () => room.join()); showFutureLoadingDialog(context: context, future: () => room.join());
} }
final typingText = room.getLocalizedTypingText(context);
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
leading: selectMode leading: selectMode
@ -482,7 +480,7 @@ class _ChatState extends State<Chat> {
titleSpacing: titleSpacing:
AdaptivePageLayout.of(context).columnMode(context) ? null : 0, AdaptivePageLayout.of(context).columnMode(context) ? null : 0,
title: selectedEvents.isEmpty title: selectedEvents.isEmpty
? StreamBuilder<Object>( ? StreamBuilder(
stream: room.onUpdate.stream, stream: room.onUpdate.stream,
builder: (context, snapshot) => ListTile( builder: (context, snapshot) => ListTile(
leading: Avatar(room.avatar, room.displayname), leading: Avatar(room.avatar, room.displayname),
@ -508,7 +506,7 @@ class _ChatState extends State<Chat> {
room.getLocalizedDisplayname( room.getLocalizedDisplayname(
MatrixLocals(L10n.of(context))), MatrixLocals(L10n.of(context))),
maxLines: 1), maxLines: 1),
subtitle: typingText.isEmpty subtitle: room.getLocalizedTypingText(context).isEmpty
? StreamBuilder<Object>( ? StreamBuilder<Object>(
stream: Matrix.of(context) stream: Matrix.of(context)
.client .client
@ -527,7 +525,7 @@ class _ChatState extends State<Chat> {
size: 13), size: 13),
SizedBox(width: 4), SizedBox(width: 4),
Text( Text(
typingText, room.getLocalizedTypingText(context),
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,