From db79a96d08e1ea2f532b6df7e67a2cd64c22e9af Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Tue, 13 Apr 2021 15:57:19 +0200 Subject: [PATCH] fix: Routing broken in chat details --- lib/views/chat.dart | 10 ++++++---- lib/views/widgets/chat_settings_popup_menu.dart | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/views/chat.dart b/lib/views/chat.dart index 3ff0ab31..3ac96a46 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -559,10 +559,12 @@ class _ChatState extends State { '${room.directChatMatrixID} ', ), ) - : () => AdaptivePageLayout.of(context) - .viewDataStack - .length < - 3 + : () => (!AdaptivePageLayout.of(context) + .columnMode(context) || + AdaptivePageLayout.of(context) + .viewDataStack + .length < + 3) ? AdaptivePageLayout.of(context) .pushNamed('/rooms/${room.id}/details') : null, diff --git a/lib/views/widgets/chat_settings_popup_menu.dart b/lib/views/widgets/chat_settings_popup_menu.dart index eb5eed6f..6d2616f5 100644 --- a/lib/views/widgets/chat_settings_popup_menu.dart +++ b/lib/views/widgets/chat_settings_popup_menu.dart @@ -95,7 +95,8 @@ class _ChatSettingsPopupMenuState extends State { widget.room.setPushRuleState(PushRuleState.notify)); break; case 'details': - if (AdaptivePageLayout.of(context).viewDataStack.length < 3) { + if (!AdaptivePageLayout.of(context).columnMode(context) || + AdaptivePageLayout.of(context).viewDataStack.length < 3) { await AdaptivePageLayout.of(context) .pushNamed('/rooms/${widget.room.id}/details'); }