Fix some small issues

This commit is contained in:
Jon Staab
2025-02-03 15:50:19 -08:00
parent 08ee07d157
commit 0f705c459a
5 changed files with 40 additions and 35 deletions
+2 -1
View File
@@ -143,7 +143,8 @@
<ChannelName {url} {room} />
</div>
{#if $notifications.has(roomPath)}
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary" transition:fade></div>
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary" transition:fade>
</div>
{/if}
</Link>
{/each}
+13 -15
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import {onDestroy} from "svelte"
import {onMount, onDestroy} from "svelte"
import {page} from "$app/stores"
import type {Readable} from "svelte/store"
import {now} from "@welshman/lib"
@@ -172,20 +172,18 @@
setTimeout(onScroll, 100)
}
$: {
if (element) {
;({events, cleanup} = makeFeed({
element,
relays: [url],
feedFilters: [filter],
subscriptionFilters: [{kinds: [DELETE, REACTION, MESSAGE], "#h": [room], since: now()}],
initialEvents: getEventsForUrl(repository, url, [{...filter, limit: 20}]),
onExhausted: () => {
loading = false
},
}))
}
}
onMount(() => {
;({events, cleanup} = makeFeed({
element,
relays: [url],
feedFilters: [filter],
subscriptionFilters: [{kinds: [DELETE, REACTION, MESSAGE], "#h": [room], since: now()}],
initialEvents: getEventsForUrl(repository, url, [{...filter, limit: 20}]),
onExhausted: () => {
loading = false
},
}))
})
onDestroy(() => {
setChecked($page.url.pathname)