mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-05-14 02:27:40 +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(() {
|
void setActiveClient(Client client) {
|
||||||
|
VRouter.of(context).to('/rooms');
|
||||||
|
setState(() {
|
||||||
_activeSpaceId = null;
|
_activeSpaceId = null;
|
||||||
selectedRoomIds.clear();
|
selectedRoomIds.clear();
|
||||||
Matrix.of(context).setActiveClient(client);
|
Matrix.of(context).setActiveClient(client);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void setActiveBundle(String bundle) => setState(() {
|
void setActiveBundle(String bundle) => setState(() {
|
||||||
_activeSpaceId = null;
|
_activeSpaceId = null;
|
||||||
|
@ -348,7 +348,12 @@ class ChatListView extends StatelessWidget {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: CupertinoSlidingSegmentedControl(
|
child: CupertinoSlidingSegmentedControl(
|
||||||
groupValue: Matrix.of(context).activeBundle,
|
groupValue:
|
||||||
|
Matrix.of(context).activeBundle ??
|
||||||
|
Matrix.of(context)
|
||||||
|
.accountBundles
|
||||||
|
.keys
|
||||||
|
.first,
|
||||||
onValueChanged: controller.setActiveBundle,
|
onValueChanged: controller.setActiveBundle,
|
||||||
children: Map.fromEntries(Matrix.of(context)
|
children: Map.fromEntries(Matrix.of(context)
|
||||||
.accountBundles
|
.accountBundles
|
||||||
|
Loading…
x
Reference in New Issue
Block a user