fix: bubble timeline not being selectable when logged out

This commit is contained in:
Marie 2025-03-25 22:40:19 +01:00
parent aebc6b4112
commit 3d27e5ce3e
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
2 changed files with 5 additions and 5 deletions

View file

@ -68,7 +68,7 @@ const rootEl = shallowRef<HTMLElement>();
type TimelinePageSrc = BasicTimelineType | `list:${string}`;
const queue = ref(0);
const srcWhenNotSignin = ref<'local' | 'global'>(isAvailableBasicTimeline('local') ? 'local' : 'global');
const srcWhenNotSignin = ref<'local' | 'bubble' | 'global'>(isAvailableBasicTimeline('local') ? 'local' : 'global');
const src = computed<TimelinePageSrc>({
get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin.value),
set: (x) => saveSrc(x),
@ -212,8 +212,8 @@ function saveSrc(newSrc: TimelinePageSrc): void {
}
defaultStore.set('tl', out);
if (['local', 'global'].includes(newSrc)) {
srcWhenNotSignin.value = newSrc as 'local' | 'global';
if (['local', 'bubble', 'global'].includes(newSrc)) {
srcWhenNotSignin.value = newSrc as 'local' | 'bubble' | 'global';
}
}