diff --git a/src/app/components/ChannelMessage.svelte b/src/app/components/ChannelMessage.svelte index 5ede62f..3ae2093 100644 --- a/src/app/components/ChannelMessage.svelte +++ b/src/app/components/ChannelMessage.svelte @@ -104,21 +104,20 @@ {formatTimestampAsTime(event.created_at)} {/if} -
+
{#if isPending} -
- + + Sending... -
+ {:else if failure} -
- + + Failed to send! -
+ {/if}
diff --git a/src/app/components/ChatMessage.svelte b/src/app/components/ChatMessage.svelte index 67fecc9..c394df2 100644 --- a/src/app/components/ChatMessage.svelte +++ b/src/app/components/ChatMessage.svelte @@ -2,7 +2,7 @@ import {derived} from "svelte/store" import {hash, uniqBy, groupBy, now} from "@welshman/lib" import type {TrustedEvent} from "@welshman/util" - import {deriveEvents} from "@welshman/store" + import {deriveEvents, throttled} from "@welshman/store" import {PublishStatus} from "@welshman/net" import { publishStatusData, @@ -33,7 +33,7 @@ const reactions = deriveEvents(repository, {filters: [{kinds: [REACTION], "#e": [event.id]}]}) const zaps = deriveEvents(repository, {filters: [{kinds: [ZAP_RESPONSE], "#e": [event.id]}]}) const [_, colorValue] = colors[parseInt(hash(event.pubkey)) % colors.length] - const ps = derived(publishStatusData, $m => Object.values($m[event.id] || {})) + const ps = throttled(300, derived(publishStatusData, $m => Object.values($m[event.wrap!.id] || {}))) const showProfile = () => pushDrawer(ProfileDetail, {pubkey: event.pubkey}) @@ -58,7 +58,7 @@ class:chat-start={event.pubkey !== $pubkey} class:chat-end={event.pubkey === $pubkey}>
-
+
{#if showPubkey}