diff --git a/lib/room.dart b/lib/room.dart index 2a7508e..2615e59 100644 --- a/lib/room.dart +++ b/lib/room.dart @@ -86,6 +86,7 @@ class _RoomPageState extends State { ), TextFormField( controller: chatController, + textInputAction: TextInputAction.send, decoration: const InputDecoration(hintText: 'Message'), onFieldSubmitted: (value) async { print("Sending text event $value to room ${widget.room.id}..."); @@ -101,7 +102,9 @@ class _RoomPageState extends State { return Scaffold( appBar: AppBar( backgroundColor: Theme.of(context).colorScheme.inversePrimary, - title: Text(widget.room.getLocalizedDisplayname()), + title: Text(widget.room + .getLocalizedDisplayname() + .replaceFirst(RegExp("Group with "), "")), actions: [ IconButton(onPressed: setAvatar, icon: const Icon(Icons.image)) ], @@ -111,11 +114,6 @@ class _RoomPageState extends State { child: Column( children: getChildren(), )), - floatingActionButton: FloatingActionButton( - onPressed: sendMessage, - tooltip: 'Send message', - child: const Icon(Icons.send), - ), ); } } diff --git a/lib/rooms.dart b/lib/rooms.dart index c5ce3f5..0d3d0a5 100644 --- a/lib/rooms.dart +++ b/lib/rooms.dart @@ -94,7 +94,8 @@ class _RoomsPageState extends State { itemCount: provider.client.rooms.length, itemBuilder: (context, index) => ListTile( title: Text(provider.client.rooms[index] - .getLocalizedDisplayname()), + .getLocalizedDisplayname() + .replaceFirst(RegExp("Group with "), "")), leading: CircleAvatar( foregroundImage: NetworkImage(provider .client.rooms[index].avatar @@ -107,11 +108,6 @@ class _RoomsPageState extends State { }, )), ), - floatingActionButton: FloatingActionButton( - onPressed: sendMessage, - tooltip: 'Send message', - child: const Icon(Icons.send), - ), ); } }