diff --git a/lib/pages/chat_list.dart b/lib/pages/chat_list.dart index 4b0aa6ac..89ec3435 100644 --- a/lib/pages/chat_list.dart +++ b/lib/pages/chat_list.dart @@ -410,11 +410,14 @@ class ChatListController extends State { } } - void setActiveClient(Client client) => setState(() { - _activeSpaceId = null; - selectedRoomIds.clear(); - Matrix.of(context).setActiveClient(client); - }); + void setActiveClient(Client client) { + VRouter.of(context).to('/rooms'); + setState(() { + _activeSpaceId = null; + selectedRoomIds.clear(); + Matrix.of(context).setActiveClient(client); + }); + } void setActiveBundle(String bundle) => setState(() { _activeSpaceId = null; diff --git a/lib/pages/views/chat_list_view.dart b/lib/pages/views/chat_list_view.dart index 9b4f5755..18604232 100644 --- a/lib/pages/views/chat_list_view.dart +++ b/lib/pages/views/chat_list_view.dart @@ -348,7 +348,12 @@ class ChatListView extends StatelessWidget { child: SizedBox( width: double.infinity, child: CupertinoSlidingSegmentedControl( - groupValue: Matrix.of(context).activeBundle, + groupValue: + Matrix.of(context).activeBundle ?? + Matrix.of(context) + .accountBundles + .keys + .first, onValueChanged: controller.setActiveBundle, children: Map.fromEntries(Matrix.of(context) .accountBundles