fix: Make sure that you deselect rooms on leaving, even if that fails
This commit is contained in:
parent
41f2d23951
commit
147726dbe3
1 changed files with 5 additions and 2 deletions
|
|
@ -327,8 +327,11 @@ class ChatListController extends State<ChatList> {
|
||||||
final client = Matrix.of(context).client;
|
final client = Matrix.of(context).client;
|
||||||
while (selectedRoomIds.isNotEmpty) {
|
while (selectedRoomIds.isNotEmpty) {
|
||||||
final roomId = selectedRoomIds.first;
|
final roomId = selectedRoomIds.first;
|
||||||
await client.getRoomById(roomId).leave();
|
try {
|
||||||
toggleSelection(roomId);
|
await client.getRoomById(roomId).leave();
|
||||||
|
} finally {
|
||||||
|
toggleSelection(roomId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue