fix: Update typing

This commit is contained in:
Christian Pauly 2020-12-17 19:14:33 +01:00
parent 6271316fcc
commit 3d70b1efbf
1 changed files with 52 additions and 51 deletions

View File

@ -521,21 +521,16 @@ class _ChatState extends State<_Chat> {
titleSpacing: 0,
title: selectedEvents.isEmpty
? StreamBuilder<Object>(
stream: Matrix.of(context)
.client
.onPresence
.stream
.where((p) => p.senderId == room.directChatMatrixID),
builder: (context, snapshot) {
return ListTile(
stream: room.onUpdate.stream,
builder: (context, snapshot) => ListTile(
leading: Avatar(room.avatar, room.displayname),
contentPadding: EdgeInsets.zero,
onTap: room.isDirectChat
? () => showModalBottomSheet(
context: context,
builder: (context) => UserBottomSheet(
user: room
.getUserByMXIDSync(room.directChatMatrixID),
user: room.getUserByMXIDSync(
room.directChatMatrixID),
onMention: () => sendController.text +=
' ${room.directChatMatrixID}',
),
@ -551,10 +546,17 @@ class _ChatState extends State<_Chat> {
MatrixLocals(L10n.of(context))),
maxLines: 1),
subtitle: typingText.isEmpty
? Text(
? StreamBuilder<Object>(
stream: Matrix.of(context)
.client
.onPresence
.stream
.where((p) =>
p.senderId == room.directChatMatrixID),
builder: (context, snapshot) => Text(
room.getLocalizedStatus(context),
maxLines: 1,
)
))
: Row(
children: <Widget>[
Icon(Icons.edit_outlined,
@ -572,8 +574,7 @@ class _ChatState extends State<_Chat> {
),
],
),
);
})
))
: Text(L10n.of(context)
.numberSelected(selectedEvents.length.toString())),
actions: selectMode