From 66d8fbd2348731aa1640dde67995e9ae335a5953 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 6 Apr 2021 18:11:44 +0200 Subject: [PATCH] Show group conversations in group page --- lib/ui/screens/authorized_group_page_screen.dart | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/ui/screens/authorized_group_page_screen.dart b/lib/ui/screens/authorized_group_page_screen.dart index 6e69978..76dcdda 100644 --- a/lib/ui/screens/authorized_group_page_screen.dart +++ b/lib/ui/screens/authorized_group_page_screen.dart @@ -1,5 +1,6 @@ import 'package:comunic/models/advanced_group_info.dart'; import 'package:comunic/ui/routes/main_route/main_route.dart'; +import 'package:comunic/ui/screens/conversation_screen.dart'; import 'package:comunic/ui/screens/group_sections/about_group_section.dart'; import 'package:comunic/ui/screens/group_sections/group_members_screen.dart'; import 'package:comunic/ui/screens/group_sections/group_posts_section.dart'; @@ -65,7 +66,18 @@ class _AuthorizedGroupPageScreenState label: tr("Members"), visible: _group.isAtLeastModerator || _group.isMembersListPublic, ) - ].where((element) => element.visible).toList(); + ].where((element) => element.visible).toList() + + // Add group conversations + ..insertAll( + 1, + _group.conversations + .map((e) => _GroupPageTab( + widget: (c) => ConversationScreen( + conversationID: e.id, + ), + label: e.name)) + .toList()); @override void initState() { @@ -93,6 +105,7 @@ class _AuthorizedGroupPageScreenState Material( color: _headerColor, child: TabBar( + isScrollable: true, tabs: _tabs.map((e) => e.tab).toList(), controller: _tabController, ),