better variable name

This commit is contained in:
futchitwo 2022-07-03 19:32:34 +09:00 committed by GitHub
parent c11cef09fc
commit e9c6d312a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,8 +45,8 @@ const tlComponent = $ref<InstanceType<typeof XTimeline>>();
const rootEl = $ref<HTMLElement>();
let queue = $ref(0);
const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : logoutSrc), set: (x) => saveSrc(x) });
let logoutSrc = $ref(isLocalTimelineAvailable ? 'local' : 'global');
let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global');
const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) });
watch ($$(src), () => queue = 0);
@ -95,7 +95,7 @@ function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global'): void {
...defaultStore.state.tl,
src: newSrc,
});
logoutSrc = newSrc ;
srcWhenNotSignin = newSrc ;
}
async function timetravel(): Promise<void> {