chore: redesign start first chat

This commit is contained in:
Christian Pauly 2021-01-16 16:03:25 +01:00
parent cf07eed211
commit e13a732688
2 changed files with 21 additions and 17 deletions

View File

@ -1609,7 +1609,7 @@
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
}, },
"startYourFirstChat": "Start your first chat :-)", "startYourFirstChat": "Start your first chat right now! 🙂\n- Tap on "+"\n- Enter the username of a friend\n- Have fun chatting",
"@startYourFirstChat": { "@startYourFirstChat": {
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}

View File

@ -283,23 +283,27 @@ class _ChatListState extends State<ChatList> {
searchController.text.toLowerCase() ?? searchController.text.toLowerCase() ??
''))); '')));
if (rooms.isEmpty && (!searchMode)) { if (rooms.isEmpty && (!searchMode)) {
return Center( return Column(
child: Column( mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Icon( Icon(
searchMode searchMode
? Icons.search_outlined ? Icons.search_outlined
: Icons.chat_bubble_outline, : Icons.maps_ugc_outlined,
size: 80, size: 80,
color: Colors.grey, color: Colors.grey,
), ),
Text(searchMode Text(
searchMode
? L10n.of(context).noRoomsFound ? L10n.of(context).noRoomsFound
: L10n.of(context) : L10n.of(context).startYourFirstChat,
.startYourFirstChat), style: TextStyle(
], color: Colors.grey,
fontSize: 16,
), ),
),
],
); );
} }
final totalCount = rooms.length; final totalCount = rooms.length;