From e51f48617669da77f5be0b7eb8eb423b8d9700e4 Mon Sep 17 00:00:00 2001 From: Stephen Zhou Date: Mon, 22 Apr 2024 23:06:31 +0800 Subject: [PATCH] fix: tab missing after costuming order (#634) --- src/contentScripts/views/Home/Home.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/contentScripts/views/Home/Home.vue b/src/contentScripts/views/Home/Home.vue index d4707637..80e3f8bc 100644 --- a/src/contentScripts/views/Home/Home.vue +++ b/src/contentScripts/views/Home/Home.vue @@ -33,10 +33,6 @@ const gridLayoutIcons = computed((): GridLayoutIcon[] => { ] }) -watch(() => activatedPage.value, () => { - handleBackToTop(settings.value.useSearchPageModeOnHomePage ? 510 : 0) -}) - // use Json stringify to watch the changes of the array item properties watch(() => JSON.stringify(settings.value.homePageTabVisibilityList), () => { currentTabs.value = computeTabs() @@ -113,6 +109,9 @@ function handleChangeTab(tab: HomeTab) { } return } + else { + handleBackToTop(settings.value.useSearchPageModeOnHomePage ? 510 : 0) + } // When the content of a tab is loading, prevent switching to another tab. // Since `initPageAction()` within the tab replaces the `handleReachBottom` and `handlePageRefresh` functions.