face: don't reload page on rect setting change

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/672/head
Varun Patil 2023-05-21 22:12:54 -07:00
parent 815f3420a0
commit 3a67accc3f
2 changed files with 5 additions and 1 deletions

View File

@ -207,6 +207,7 @@ export default defineComponent({
subscribe('memories:window:resize', this.handleResizeWithDelay); subscribe('memories:window:resize', this.handleResizeWithDelay);
subscribe('memories:viewer:deleted', this.deleteFromViewWithAnimation); subscribe('memories:viewer:deleted', this.deleteFromViewWithAnimation);
subscribe('memories:viewer:fetch-day', this.fetchDay); subscribe('memories:viewer:fetch-day', this.fetchDay);
subscribe('memories:timeline:hard-refresh', this.refresh);
}, },
beforeDestroy() { beforeDestroy() {
@ -215,6 +216,7 @@ export default defineComponent({
unsubscribe('memories:window:resize', this.handleResizeWithDelay); unsubscribe('memories:window:resize', this.handleResizeWithDelay);
unsubscribe('memories:viewer:deleted', this.deleteFromViewWithAnimation); unsubscribe('memories:viewer:deleted', this.deleteFromViewWithAnimation);
unsubscribe('memories:viewer:fetch-day', this.fetchDay); unsubscribe('memories:viewer:fetch-day', this.fetchDay);
unsubscribe('memories:timeline:hard-refresh', this.refresh);
this.resetState(); this.resetState();
this.state = 0; this.state = 0;
}, },

View File

@ -55,6 +55,8 @@ import NcActions from '@nextcloud/vue/dist/Components/NcActions';
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton'; import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton';
import NcActionCheckbox from '@nextcloud/vue/dist/Components/NcActionCheckbox'; import NcActionCheckbox from '@nextcloud/vue/dist/Components/NcActionCheckbox';
import { emit } from '@nextcloud/event-bus';
import FaceEditModal from '../modal/FaceEditModal.vue'; import FaceEditModal from '../modal/FaceEditModal.vue';
import FaceDeleteModal from '../modal/FaceDeleteModal.vue'; import FaceDeleteModal from '../modal/FaceDeleteModal.vue';
import FaceMergeModal from '../modal/FaceMergeModal.vue'; import FaceMergeModal from '../modal/FaceMergeModal.vue';
@ -105,7 +107,7 @@ export default defineComponent({
changeShowFaceRect() { changeShowFaceRect() {
this.updateSetting('show_face_rect'); this.updateSetting('show_face_rect');
setTimeout(() => this.$router.go(0), 100); // refresh page emit('memories:timeline:hard-refresh', {});
}, },
}, },
}); });