fix: Routing broken in chat details

onboarding
Christian Pauly 4 years ago
parent 2e402acb7f
commit db79a96d08

@ -559,10 +559,12 @@ class _ChatState extends State<Chat> {
'${room.directChatMatrixID} ', '${room.directChatMatrixID} ',
), ),
) )
: () => AdaptivePageLayout.of(context) : () => (!AdaptivePageLayout.of(context)
.viewDataStack .columnMode(context) ||
.length < AdaptivePageLayout.of(context)
3 .viewDataStack
.length <
3)
? AdaptivePageLayout.of(context) ? AdaptivePageLayout.of(context)
.pushNamed('/rooms/${room.id}/details') .pushNamed('/rooms/${room.id}/details')
: null, : null,

@ -95,7 +95,8 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
widget.room.setPushRuleState(PushRuleState.notify)); widget.room.setPushRuleState(PushRuleState.notify));
break; break;
case 'details': 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) await AdaptivePageLayout.of(context)
.pushNamed('/rooms/${widget.room.id}/details'); .pushNamed('/rooms/${widget.room.id}/details');
} }

Loading…
Cancel
Save