mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 04:49:21 +00:00
Make presence tab work
This commit is contained in:
parent
c4790635df
commit
44b6fb65bc
@ -4,6 +4,7 @@ import 'package:comunic/ui/dialogs/alert_dialog.dart';
|
||||
import 'package:comunic/ui/routes/main_route/main_route.dart';
|
||||
import 'package:comunic/ui/routes/main_route/page_info.dart';
|
||||
import 'package:comunic/ui/screens/conversations_list_screen.dart';
|
||||
import 'package:comunic/ui/screens/group_sections/forez_presence_section.dart';
|
||||
import 'package:comunic/ui/widgets/safe_state.dart';
|
||||
import 'package:comunic/ui/widgets/status_widget.dart';
|
||||
import 'package:comunic/ui/widgets/tab_transition_widget.dart';
|
||||
@ -114,14 +115,14 @@ class _ForezRouteBodyState extends SafeState<ForezRouteBody> {
|
||||
_Tab(
|
||||
icon: Icons.calendar_today,
|
||||
title: tr("Presence"),
|
||||
widget: Text("Presence"),
|
||||
widget: () => ForezPresenceSection(groupID: forezGroup.id),
|
||||
),
|
||||
|
||||
// Conversations tab
|
||||
_Tab(
|
||||
icon: Icons.question_answer,
|
||||
title: tr("Conversations"),
|
||||
widget: ConversationsListScreen(),
|
||||
widget: () => ConversationsListScreen(),
|
||||
isUnread: (c) => StatusWidgetState.of(c).unreadConversations > 0,
|
||||
),
|
||||
|
||||
@ -129,7 +130,7 @@ class _ForezRouteBodyState extends SafeState<ForezRouteBody> {
|
||||
_Tab(
|
||||
icon: Icons.import_contacts,
|
||||
title: tr("Directory"),
|
||||
widget: Text("Directory"),
|
||||
widget: () => Text("Directory"),
|
||||
),
|
||||
];
|
||||
|
||||
@ -147,13 +148,13 @@ class _ForezRouteBodyState extends SafeState<ForezRouteBody> {
|
||||
.toList();
|
||||
|
||||
List<Widget> get _tabsPages =>
|
||||
_list.map((e) => TabTransitionWidget(e.widget)).toList();
|
||||
_list.map((e) => TabTransitionWidget(e.widget())).toList();
|
||||
}
|
||||
|
||||
class _Tab {
|
||||
final IconData icon;
|
||||
final String title;
|
||||
final Widget widget;
|
||||
final Widget Function() widget;
|
||||
final bool Function(BuildContext) isUnread;
|
||||
|
||||
const _Tab({
|
||||
|
Loading…
Reference in New Issue
Block a user