mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
fix: 🐛 Fix slide sync on initial timeline load
This commit is contained in:
parent
7de1d1327e
commit
64924986bf
@ -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 New Issue
Block a user