From 3a67accc3f787d4e44e00bb968dd1cb5f47a0a70 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 21 May 2023 22:12:54 -0700 Subject: [PATCH] face: don't reload page on rect setting change Signed-off-by: Varun Patil --- src/components/Timeline.vue | 2 ++ src/components/top-matter/FaceTopMatter.vue | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index 23ba9645..0445d359 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -207,6 +207,7 @@ export default defineComponent({ subscribe('memories:window:resize', this.handleResizeWithDelay); subscribe('memories:viewer:deleted', this.deleteFromViewWithAnimation); subscribe('memories:viewer:fetch-day', this.fetchDay); + subscribe('memories:timeline:hard-refresh', this.refresh); }, beforeDestroy() { @@ -215,6 +216,7 @@ export default defineComponent({ unsubscribe('memories:window:resize', this.handleResizeWithDelay); unsubscribe('memories:viewer:deleted', this.deleteFromViewWithAnimation); unsubscribe('memories:viewer:fetch-day', this.fetchDay); + unsubscribe('memories:timeline:hard-refresh', this.refresh); this.resetState(); this.state = 0; }, diff --git a/src/components/top-matter/FaceTopMatter.vue b/src/components/top-matter/FaceTopMatter.vue index cab9f315..fbbecc1d 100644 --- a/src/components/top-matter/FaceTopMatter.vue +++ b/src/components/top-matter/FaceTopMatter.vue @@ -55,6 +55,8 @@ import NcActions from '@nextcloud/vue/dist/Components/NcActions'; import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton'; import NcActionCheckbox from '@nextcloud/vue/dist/Components/NcActionCheckbox'; +import { emit } from '@nextcloud/event-bus'; + import FaceEditModal from '../modal/FaceEditModal.vue'; import FaceDeleteModal from '../modal/FaceDeleteModal.vue'; import FaceMergeModal from '../modal/FaceMergeModal.vue'; @@ -105,7 +107,7 @@ export default defineComponent({ changeShowFaceRect() { this.updateSetting('show_face_rect'); - setTimeout(() => this.$router.go(0), 100); // refresh page + emit('memories:timeline:hard-refresh', {}); }, }, });