diff --git a/src/app/commands.ts b/src/app/commands.ts index 54287059..1e4ffde5 100644 --- a/src/app/commands.ts +++ b/src/app/commands.ts @@ -1,11 +1,10 @@ import {get} from "svelte/store" -import {ctx, uniqBy, uniq, sleep, chunk, equals, choice, append} from "@welshman/lib" +import {ctx, uniq, sleep, chunk, equals, choice} from "@welshman/lib" import { DELETE, PROFILE, INBOX_RELAYS, RELAYS, - MUTES, FOLLOWS, REACTION, isSignedEvent, @@ -14,7 +13,6 @@ import { normalizeRelayUrl, makeList, addToListPublicly, - removeFromList, removeFromListByPredicate, getListTags, getRelayTags, @@ -37,7 +35,6 @@ import { loadMutes, getFollows, tagEvent, - tagPubkey, tagReactionTo, getRelayUrls, userRelaySelections, @@ -155,8 +152,7 @@ export const removeRoomMembership = async (url: string, room: string) => { export const setRelayPolicy = (url: string, read: boolean, write: boolean) => { const list = get(userRelaySelections) || makeList({kind: RELAYS}) - let tags = getRelayTags(getListTags(list)) - .filter(t => normalizeRelayUrl(t[1]) !== url) + const tags = getRelayTags(getListTags(list)).filter(t => normalizeRelayUrl(t[1]) !== url) if (read && write) { tags.push(["r", url]) @@ -177,8 +173,7 @@ export const setInboxRelayPolicy = (url: string, enabled: boolean) => { // Only update inbox policies if they already exist or we're adding them if (enabled || getRelayUrls(list).includes(url)) { - let tags = getRelayTags(getListTags(list)) - .filter(t => normalizeRelayUrl(t[1]) !== url) + const tags = getRelayTags(getListTags(list)).filter(t => normalizeRelayUrl(t[1]) !== url) if (enabled) { tags.push(["relay", url]) @@ -222,7 +217,7 @@ export const sendWrapped = async ({ makeThunk({ event: await nip59.wrap(recipient, stamp(template)), relays: ctx.app.router.PublishMessage(recipient).getUrls(), - }) + }), ) }), ) diff --git a/src/app/components/ChatMessage.svelte b/src/app/components/ChatMessage.svelte index d4ec03d7..659c40f2 100644 --- a/src/app/components/ChatMessage.svelte +++ b/src/app/components/ChatMessage.svelte @@ -31,7 +31,7 @@ const profileDisplay = deriveProfileDisplay(event.pubkey) const reactions = deriveEvents(repository, {filters: [{kinds: [REACTION], "#e": [event.id]}]}) const zaps = deriveEvents(repository, {filters: [{kinds: [ZAP_RESPONSE], "#e": [event.id]}]}) - const [colorName, colorValue] = colors[parseInt(hash(event.pubkey)) % colors.length] + const [_, colorValue] = colors[parseInt(hash(event.pubkey)) % colors.length] const ps = derived(publishStatusData, $m => Object.values($m[event.id] || {})) const showProfile = () => pushDrawer(ProfileDetail, {pubkey: event.pubkey}) @@ -57,17 +57,24 @@ class="group chat relative flex w-full flex-col gap-1 p-2 text-left" class:chat-start={event.pubkey !== $pubkey} class:chat-end={event.pubkey === $pubkey}> -
-
+
+
{#if showPubkey} {/if}
{#if showPubkey}
- {formatTimestampAsTime(event.created_at)} diff --git a/src/app/components/MenuHome.svelte b/src/app/components/MenuHome.svelte index 2e1e878b..5e03e9b1 100644 --- a/src/app/components/MenuHome.svelte +++ b/src/app/components/MenuHome.svelte @@ -1,24 +1,10 @@ -