mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
Improve group page
This commit is contained in:
parent
7dd91df471
commit
afeb8c4a7d
@ -50,19 +50,19 @@ class _AuthorizedGroupPageScreenState
|
||||
List<_GroupPageTab> get _tabs => [
|
||||
// Posts list
|
||||
_GroupPageTab(
|
||||
widget: GroupPostsSection(group: _group),
|
||||
widget: (c) => GroupPostsSection(group: _group),
|
||||
label: tr("Posts"),
|
||||
),
|
||||
|
||||
// About the group
|
||||
_GroupPageTab(
|
||||
widget: AboutGroupSection(group: _group),
|
||||
widget: (c) => AboutGroupSection(group: _group),
|
||||
label: tr("About"),
|
||||
)
|
||||
]..addAll(_group.isAtLeastModerator
|
||||
? [
|
||||
_GroupPageTab(
|
||||
widget: GroupMembersSection(groupID: _group.id),
|
||||
widget: (c) => GroupMembersSection(groupID: _group.id),
|
||||
label: tr("Members"),
|
||||
),
|
||||
]
|
||||
@ -91,7 +91,7 @@ class _AuthorizedGroupPageScreenState
|
||||
child: Column(
|
||||
children: [
|
||||
_buildGroupPageHeader(),
|
||||
Container(
|
||||
Material(
|
||||
color: _headerColor,
|
||||
child: TabBar(
|
||||
tabs: _tabs.map((e) => e.tab).toList(),
|
||||
@ -101,7 +101,7 @@ class _AuthorizedGroupPageScreenState
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: _tabs.map((e) => e.widget).toList(),
|
||||
children: _tabs.map((e) => e.widget(context)).toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -172,7 +172,7 @@ class _AuthorizedGroupPageScreenState
|
||||
}
|
||||
|
||||
class _GroupPageTab {
|
||||
final Widget widget;
|
||||
final WidgetBuilder widget;
|
||||
final String label;
|
||||
|
||||
const _GroupPageTab({
|
||||
|
Loading…
Reference in New Issue
Block a user