From 60fb59c878a017e0579ce2687e5267f856682f1c Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 5 Sep 2022 18:42:01 -0700 Subject: [PATCH] fix: :bug: sync fixed --- package.json | 2 +- packages/client/src/pages/timeline.vue | 33 +++++++++++++------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index bc45cab21..a44247979 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "12.118.1-calc.2-beta.2-rc.8", + "version": "12.118.1-calc.2-beta.2-rc.9", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/pages/timeline.vue b/packages/client/src/pages/timeline.vue index 7e0694675..e7faf7d39 100644 --- a/packages/client/src/pages/timeline.vue +++ b/packages/client/src/pages/timeline.vue @@ -97,6 +97,21 @@ const keymap = { t: focus, }; +let timelines = ['home']; + +if (isLocalTimelineAvailable) { + timelines.push('local'); +} +if (isRecommendedTimelineAvailable) { + timelines.push('recommended'); +} +if (isLocalTimelineAvailable) { + timelines.push('social'); +} +if (isGlobalTimelineAvailable) { + timelines.push('global'); +} + const MOBILE_THRESHOLD = 500; // デスクトップでウィンドウを狭くしたときモバイルUIが表示されて欲しいことはあるので deviceKind === 'desktop' の判定は行わない @@ -116,8 +131,7 @@ const src = $computed({ get: () => defaultStore.reactiveState.tl.value.src, set: (x) => { saveSrc(x); - console.log('set src', x); - syncSlide(x); + syncSlide(timelines.indexOf(x)); }, }); @@ -259,21 +273,6 @@ definePageMetadata( })), ); -let timelines = ['home']; - -if (isLocalTimelineAvailable) { - timelines.push('local'); -} -if (isRecommendedTimelineAvailable) { - timelines.push('recommended'); -} -if (isLocalTimelineAvailable) { - timelines.push('social'); -} -if (isGlobalTimelineAvailable) { - timelines.push('global'); -} - let swiperRef = null; function setSwiperRef(swiper) {