fix: navigate to /rooms when switching bundle

This commit is contained in:
Sorunome 2021-09-21 09:16:57 +02:00
parent 396a433cae
commit 57088bf741
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 14 additions and 11 deletions

View File

@ -419,17 +419,20 @@ class ChatListController extends State<ChatList> {
});
}
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)