1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-10-22 22:43:22 +00:00

Fix state issue

This commit is contained in:
Pierre HUBERT 2021-04-25 17:55:39 +02:00
parent 8802a52816
commit 7147ca65e6

View File

@ -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 }