fix: 🐛 sync fixed

This commit is contained in:
ThatOneCalculator 2022-09-05 18:42:01 -07:00
parent e3e95e86fa
commit 60fb59c878
2 changed files with 17 additions and 18 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "12.118.1-calc.2-beta.2-rc.8", "version": "12.118.1-calc.2-beta.2-rc.9",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -97,6 +97,21 @@ const keymap = {
t: focus, 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; const MOBILE_THRESHOLD = 500;
// UI deviceKind === 'desktop' // UI deviceKind === 'desktop'
@ -116,8 +131,7 @@ const src = $computed({
get: () => defaultStore.reactiveState.tl.value.src, get: () => defaultStore.reactiveState.tl.value.src,
set: (x) => { set: (x) => {
saveSrc(x); saveSrc(x);
console.log('set src', x); syncSlide(timelines.indexOf(x));
syncSlide(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; let swiperRef = null;
function setSwiperRef(swiper) { function setSwiperRef(swiper) {