1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-27 05:18:50 +00:00

Show group conversations in group page

This commit is contained in:
Pierre HUBERT 2021-04-06 18:11:44 +02:00
parent 0fb83079a6
commit 66d8fbd234

View File

@ -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,
),