Fix archiving bugs
This commit is contained in:
parent
75f64e57d0
commit
1cf0caf48d
2 changed files with 17 additions and 2 deletions
|
|
@ -338,6 +338,16 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
widget.controller.cancelAction();
|
||||
// #Pangea
|
||||
if (room == null || room.membership == Membership.leave) return;
|
||||
if (room.isSpace) {
|
||||
await room.archiveSpace(
|
||||
context,
|
||||
Matrix.of(context).client,
|
||||
onlyAdmin: false,
|
||||
);
|
||||
} else {
|
||||
widget.controller.toggleSelection(room.id);
|
||||
await widget.controller.archiveAction();
|
||||
}
|
||||
// Pangea#
|
||||
_refresh();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -60,9 +60,14 @@ extension EventsRoomExtension on Room {
|
|||
future: () async {
|
||||
final List<Room> children = await getChildRooms();
|
||||
for (final Room child in children) {
|
||||
await child.archive();
|
||||
if (!child.isAnalyticsRoom) {
|
||||
if (child.membership != Membership.join) {
|
||||
child.join;
|
||||
}
|
||||
await child.archive();
|
||||
}
|
||||
}
|
||||
await archive();
|
||||
await _archive();
|
||||
},
|
||||
);
|
||||
MatrixState.pangeaController.classController
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue