more targeted refresh

This commit is contained in:
Moon.eth
2026-07-29 12:51:33 +09:00
parent 4f682857ac
commit a42145c678
11 changed files with 229 additions and 4 deletions
+4
View File
@@ -9,6 +9,7 @@
import { useAppServices } from '$lib/app-services'
import { Feed } from '$lib/stores/feed.svelte'
import { instanceDomain } from '$lib/api/endpoints'
import { useTimelineRefresh } from '$lib/timeline-refresh'
import Module from '$components/common/Module.svelte'
import TabBar from '$components/common/TabBar.svelte'
import BlogList from '$components/blog/BlogList.svelte'
@@ -22,6 +23,7 @@
let { kind, tag }: Props = $props()
const { endpoints, session } = useAppServices()
const timelineRefresh = useTimelineRefresh()
let feed = $state<Feed<Status>>(new Feed<Status>(async () => ({ items: [], links: {} })))
const domain = $derived(session.host ? instanceDomain(session.instance, session.host) : '')
@@ -61,6 +63,8 @@
document.title = `${title} | plspace`
})
})
$effect(() => timelineRefresh?.register(() => void feed.reload()))
</script>
<div class="page timeline-page" data-timeline={kind} data-tag={tag ?? ''}>