From 7147ca65e6a3818f2e222e8ebe0a936c4d07cb88 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 25 Apr 2021 17:55:39 +0200 Subject: [PATCH] Fix state issue --- lib/forez/ui/routes/forez_route.dart | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/forez/ui/routes/forez_route.dart b/lib/forez/ui/routes/forez_route.dart index a01fdba..817eb2f 100644 --- a/lib/forez/ui/routes/forez_route.dart +++ b/lib/forez/ui/routes/forez_route.dart @@ -54,6 +54,14 @@ class _MainRouteState extends MainController { ); } + @override + void pushPage(PageInfo page) { + if (page.hideNavBar) + Navigator.of(context).push(MaterialPageRoute(builder: (c) => page.child)); + else + super.pushPage(page); + } + @override void openConversation(Conversation conv, {fullScreen: false}) { // Forcefully open conversations in a "normal" way (do not display groups) @@ -61,10 +69,16 @@ class _MainRouteState extends MainController { } @override - void openGroup(int groupID, {int conversationID}) { - alert(context, - tr("This feature is available only in the Comunic application!")); - } + void openGroup(int groupID, {int conversationID}) => _unsupportedFeature(); + + @override + void openUserPage(int userID) => _unsupportedFeature(); + + @override + void openFriendsList() => _unsupportedFeature(); + + void _unsupportedFeature() => alert(context, + tr("This feature is available only in the Comunic application!")); } enum _PopupMenuItems { ACTION_SETTINGS, ACTION_SIGN_OUT }