Fix purge room

This commit is contained in:
N-Pex 2023-10-10 10:46:17 +02:00
parent c46d3a698f
commit a18dd1381c
2 changed files with 9 additions and 4 deletions

View file

@ -1,5 +1,6 @@
<template> <template>
<v-dialog <v-dialog
persistent
v-model="showDialog" v-model="showDialog"
v-show="room" class="ma-0 pa-0" v-show="room" class="ma-0 pa-0"
:width="$vuetify.breakpoint.smAndUp ? '688px' : '95%'" :width="$vuetify.breakpoint.smAndUp ? '688px' : '95%'"
@ -119,9 +120,13 @@ export default {
this.showDialog = newVal; this.showDialog = newVal;
}, },
}, },
showDialog() { showDialog(val, oldVal) {
if (!this.showDialog) { if (!val && oldVal) {
this.undo();
this.$emit("close"); this.$emit("close");
} else if (val && !oldVal) {
// Showing, reset
this.status = null;
} }
}, },
}, },

View file

@ -840,11 +840,11 @@ export default {
return kickFirstMember(allMembers); return kickFirstMember(allMembers);
}) })
.then(() => { .then(() => {
return this.matrixClient.sendStateEvent( return withRetry(() => this.matrixClient.sendStateEvent(
roomId, roomId,
STATE_EVENT_ROOM_DELETED, STATE_EVENT_ROOM_DELETED,
{ status: "deleted" } { status: "deleted" }
); ));
}) })
.then(() => { .then(() => {
statusCallback(null); statusCallback(null);