From 57088bf74188320b43a9783e1b86dc54443e6bef Mon Sep 17 00:00:00 2001 From: Sorunome Date: Tue, 21 Sep 2021 09:16:57 +0200 Subject: [PATCH] fix: navigate to /rooms when switching bundle --- lib/pages/chat_list.dart | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/pages/chat_list.dart b/lib/pages/chat_list.dart index e2d51aa5..481129ab 100644 --- a/lib/pages/chat_list.dart +++ b/lib/pages/chat_list.dart @@ -419,17 +419,20 @@ class ChatListController extends State { }); } - void setActiveBundle(String bundle) => setState(() { - _activeSpaceId = null; - selectedRoomIds.clear(); - Matrix.of(context).activeBundle = bundle; - if (!Matrix.of(context) - .currentBundle - .any((client) => client == Matrix.of(context).client)) { - Matrix.of(context) - .setActiveClient(Matrix.of(context).currentBundle.first); - } - }); + void setActiveBundle(String bundle) { + VRouter.of(context).to('/rooms'); + setState(() { + _activeSpaceId = null; + selectedRoomIds.clear(); + Matrix.of(context).activeBundle = bundle; + if (!Matrix.of(context) + .currentBundle + .any((client) => client == Matrix.of(context).client)) { + Matrix.of(context) + .setActiveClient(Matrix.of(context).currentBundle.first); + } + }); + } void editBundlesForAccount(String userId) async { final client = Matrix.of(context)