From 4ff5f44e990c83ebe59fc3b3637daac438c71aef Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 9 Sep 2022 13:31:48 -0700 Subject: [PATCH] fix: :ambulance: tl not showing up --- package.json | 2 +- packages/client/src/pages/explore.vue | 8 +------- packages/client/src/pages/timeline.vue | 10 +++------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 4e6509716..9ce3cb73b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "12.118.1-calc.2-rc.18", + "version": "12.118.1-calc.2-rc.19", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/pages/explore.vue b/packages/client/src/pages/explore.vue index bc8d31404..460c1eed3 100644 --- a/packages/client/src/pages/explore.vue +++ b/packages/client/src/pages/explore.vue @@ -62,7 +62,7 @@ const props = defineProps<{ // let tab = $ref('featured'); const tab = $computed({ - get: () => getSrc(), + get: () => $ref('featured'), set: (x) => { syncSlide(['featured', 'users', 'search'].indexOf(x)); }, @@ -120,10 +120,4 @@ function syncSlide(index) { swiperRef.slideTo(index); } -function getSrc() { - const dSrc = $ref('featured'); - syncSlide(dSrc); - return dSrc; -} - diff --git a/packages/client/src/pages/timeline.vue b/packages/client/src/pages/timeline.vue index e32902aae..7a1012fe0 100644 --- a/packages/client/src/pages/timeline.vue +++ b/packages/client/src/pages/timeline.vue @@ -127,7 +127,7 @@ const rootEl = $ref(); let queue = $ref(0); const src = $computed({ - get: () => getSrc(), + get: () => defaultStore.state.tl.src, set: (x) => { saveSrc(x); syncSlide(timelines.indexOf(x)); @@ -278,12 +278,6 @@ function setSwiperRef(swiper) { swiperRef = swiper; } -function getSrc(): 'home' | 'local' | 'recommended' | 'social' | 'global' { - const dSrc = defaultStore.state.tl.src; - syncSlide(dSrc); - return dSrc; -} - function onSlideChange() { saveSrc(timelines[swiperRef.activeIndex]); } @@ -292,6 +286,8 @@ function syncSlide(index) { swiperRef.slideTo(index); } +syncSlide(timelines.indexOf(src)); +