mirror of
https://git.shipoclu.com/moon/plspace.git
synced 2026-08-13 02:42:30 +00:00
more targeted refresh
This commit is contained in:
@@ -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 ?? ''}>
|
||||
|
||||
Reference in New Issue
Block a user