mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 11:57:34 -07:00
fix: 🐛 Fix slide sync on initial timeline load
This commit is contained in:
parent
7de1d1327e
commit
64924986bf
2 changed files with 8 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "calckey",
|
||||
"version": "12.118.1-calc.2-beta.2-rc.17",
|
||||
"version": "12.118.1-calc.2-rc.18",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -127,7 +127,7 @@ const rootEl = $ref<HTMLElement>();
|
|||
|
||||
let queue = $ref(0);
|
||||
const src = $computed({
|
||||
get: () => defaultStore.reactiveState.tl.value.src,
|
||||
get: () => getSrc(),
|
||||
set: (x) => {
|
||||
saveSrc(x);
|
||||
syncSlide(timelines.indexOf(x));
|
||||
|
@ -278,6 +278,12 @@ 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]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue