From 49ee7e005ce807310a627fdf2ffb074062931caf Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle Date: Fri, 14 Mar 2025 09:44:26 +0000 Subject: [PATCH] remove redundant route handling in thread context --- .../lib/viewer/composables/commentManagement.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/frontend-2/lib/viewer/composables/commentManagement.ts b/packages/frontend-2/lib/viewer/composables/commentManagement.ts index dd072a8d8..39fbc451f 100644 --- a/packages/frontend-2/lib/viewer/composables/commentManagement.ts +++ b/packages/frontend-2/lib/viewer/composables/commentManagement.ts @@ -37,7 +37,6 @@ import { useApplySerializedState, StateApplyMode } from '~~/lib/viewer/composables/serialization' -import { useRouter } from 'vue-router' import type { CommentBubbleModel } from '~/lib/viewer/composables/commentBubbles' export function useViewerCommentUpdateTracking( @@ -254,10 +253,8 @@ export const useCommentContext = () => { const applyState = useApplySerializedState() const { serialize } = useStateSerialization() const state = useInjectedViewerState() - const router = useRouter() const previousState = ref(null) - const previousRoute = ref(null) const thread = computed(() => state.ui.threads.openThread.thread.value) @@ -329,7 +326,6 @@ export const useCommentContext = () => { // Store current state before applying new one previousState.value = serialize() - previousRoute.value = router.currentRoute.value.fullPath await applyState(state, mode) } @@ -353,12 +349,7 @@ export const useCommentContext = () => { await applyState(previousState.value, StateApplyMode.ThreadFullContextOpen) - if (previousRoute.value) { - await router.push(previousRoute.value) - } - previousState.value = null - previousRoute.value = null } return {