Redirect to rooms when archiving or leaving active room
This commit is contained in:
parent
4b8fe976f1
commit
f58bc1d67d
2 changed files with 18 additions and 1 deletions
|
|
@ -587,11 +587,20 @@ class ChatListController extends State<ChatList>
|
|||
) ==
|
||||
OkCancelResult.ok;
|
||||
if (!confirmed) return;
|
||||
// #Pangea
|
||||
final bool archivedActiveRoom =
|
||||
selectedRoomIds.contains(Matrix.of(context).activeRoomId);
|
||||
// Pangea#
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => _archiveSelectedRooms(),
|
||||
);
|
||||
setState(() {});
|
||||
// #Pangea
|
||||
if (archivedActiveRoom) {
|
||||
VRouter.of(context).to('/rooms');
|
||||
}
|
||||
// Pangea#
|
||||
}
|
||||
|
||||
void setStatus() async {
|
||||
|
|
|
|||
|
|
@ -162,7 +162,15 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
case SpaceChildContextAction.leave:
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: room!.leave,
|
||||
// #Pangea
|
||||
// future: room!.leave,
|
||||
future: () async {
|
||||
await room!.leave();
|
||||
if (Matrix.of(context).activeRoomId == room.id) {
|
||||
VRouter.of(context).to('/rooms');
|
||||
}
|
||||
},
|
||||
// Pangea#
|
||||
);
|
||||
break;
|
||||
case SpaceChildContextAction.removeFromSpace:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue