mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-05-13 18:07:34 +02:00
fix: Account switcher
This commit is contained in:
parent
e227bb9200
commit
7f6e37adf2
@ -410,11 +410,14 @@ class ChatListController extends State<ChatList> {
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user