diff --git a/src/app/commands.ts b/src/app/commands.ts
index 302f7cd6..db1a4c6b 100644
--- a/src/app/commands.ts
+++ b/src/app/commands.ts
@@ -12,7 +12,7 @@ import {
getWriteRelayUrls,
loadFollows,
loadMutes,
- followsByPubkey,
+ getFollows,
} from "@welshman/app"
import {ROOM, MEMBERSHIPS, INDEXER_RELAYS} from "@app/state"
@@ -60,14 +60,13 @@ export const loadUserData = (
// Load followed profiles slowly in the background without clogging other stuff up
promise.then(async () => {
- const followsList = followsByPubkey.get().get(pubkey)
- const follows = getPubkeyTagValues(followsList?.event.tags || [])
-
- for (const pubkeys of chunk(50, follows)) {
+ for (const pubkeys of chunk(50, getFollows(pubkey))) {
await sleep(300)
for (const pubkey of pubkeys) {
loadProfile(pubkey)
+ loadFollows(pubkey)
+ loadMutes(pubkey)
}
}
})
diff --git a/src/app/components/ChatMessage.svelte b/src/app/components/ChatMessage.svelte
index 9170c506..5c762253 100644
--- a/src/app/components/ChatMessage.svelte
+++ b/src/app/components/ChatMessage.svelte
@@ -20,6 +20,7 @@
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
import Avatar from "@lib/components/Avatar.svelte"
+ import Content from "@app/components/Content.svelte"
import {REPLY, deriveEvent, displayReaction} from "@app/state"
export let event: TrustedEvent
@@ -90,7 +91,7 @@
{:else}
+
{preview.title}
{ellipsize(preview.description, 140)}
{/if}
+ {:catch}
+
+ Unable to load a preview for {url}
+
{/await}
{/if}
diff --git a/src/app/components/ContentMention.svelte b/src/app/components/ContentMention.svelte
index 290694d3..a22cc688 100644
--- a/src/app/components/ContentMention.svelte
+++ b/src/app/components/ContentMention.svelte
@@ -3,7 +3,7 @@
import {displayProfile} from "@welshman/util"
import {deriveProfile} from "@welshman/app"
import Link from "@lib/components/Link.svelte"
- import {nostr} from '@app/state'
+ import {entityLink} from '@app/state'
export let value
@@ -11,6 +11,6 @@
const nprofile = nip19.nprofileEncode(value)
-
+
@{displayProfile($profile)}
diff --git a/src/app/components/Profile.svelte b/src/app/components/Profile.svelte
index 622d30b2..f3f91480 100644
--- a/src/app/components/Profile.svelte
+++ b/src/app/components/Profile.svelte
@@ -1,20 +1,25 @@
-
+
-
-
{$profileDisplay}
-
{displayPubkey(pubkey)}
+
+
+ {$profileDisplay}
+
+
+ {$handle ? displayHandle($handle) : displayPubkey(pubkey)}
+
diff --git a/src/app/state.ts b/src/app/state.ts
index 5a02430b..4521c1fd 100644
--- a/src/app/state.ts
+++ b/src/app/state.ts
@@ -43,7 +43,11 @@ export const REPLY = 1111
export const MEMBERSHIPS = 10209
-export const INDEXER_RELAYS = ["wss://purplepag.es/", "wss://relay.damus.io/", "wss://nos.lol/"]
+export const INDEXER_RELAYS = [
+ "wss://purplepag.es/",
+ "wss://relay.damus.io/",
+ "wss://relay.nostr.band/",
+]
export const DUFFLEPUD_URL = "https://dufflepud.onrender.com"
@@ -67,7 +71,7 @@ export const imgproxy = (url: string, {w = 640, h = 1024} = {}) => {
}
}
-export const nostr = (entity: string) => `https://coracle.social/${entity}`
+export const entityLink = (entity: string) => `https://coracle.social/${entity}`
setContext({
net: getDefaultNetContext(),
diff --git a/src/lib/components/Avatar.svelte b/src/lib/components/Avatar.svelte
index 118d097b..fb896d16 100644
--- a/src/lib/components/Avatar.svelte
+++ b/src/lib/components/Avatar.svelte
@@ -9,8 +9,9 @@
+ class={cx($$props.class, "!flex overflow-hidden rounded-full")}
+ class:center={!src}
+ style={`width: ${size * 4}px; height: ${size * 4}px; min-width: ${size * 4}px;`}>
{#if src}
![]()
{:else}
diff --git a/src/lib/editor/EditEvent.svelte b/src/lib/editor/EditEvent.svelte
index 9eb0137e..19cbe400 100644
--- a/src/lib/editor/EditEvent.svelte
+++ b/src/lib/editor/EditEvent.svelte
@@ -4,7 +4,7 @@
import {ellipsize} from "@welshman/lib"
import {type TrustedEvent, fromNostrURI, Address} from "@welshman/util"
import Link from "@lib/components/Link.svelte"
- import {deriveEvent, nostr} from "@app/state"
+ import {deriveEvent, entityLink} from "@app/state"
export let node: NodeViewProps["node"]
@@ -18,7 +18,7 @@
-
+
{displayEvent($event)}
diff --git a/src/lib/editor/EditMention.svelte b/src/lib/editor/EditMention.svelte
index 79e92b4a..202367de 100644
--- a/src/lib/editor/EditMention.svelte
+++ b/src/lib/editor/EditMention.svelte
@@ -5,7 +5,7 @@
import {displayProfile} from "@welshman/util"
import {deriveProfile} from "@welshman/app"
import Link from "@lib/components/Link.svelte"
- import {nostr} from '@app/state'
+ import {entityLink} from '@app/state'
export let node: NodeViewProps["node"]
export let selected: NodeViewProps["selected"]
@@ -16,7 +16,7 @@
@{displayProfile($profile)}
diff --git a/src/lib/editor/SuggestionProfile.svelte b/src/lib/editor/SuggestionProfile.svelte
index 16364ad5..54bbd7ef 100644
--- a/src/lib/editor/SuggestionProfile.svelte
+++ b/src/lib/editor/SuggestionProfile.svelte
@@ -1,9 +1,7 @@
-@{$display}
+
diff --git a/src/lib/editor/Suggestions.svelte b/src/lib/editor/Suggestions.svelte
index a0dcdfc0..22b0847d 100644
--- a/src/lib/editor/Suggestions.svelte
+++ b/src/lib/editor/Suggestions.svelte
@@ -20,7 +20,7 @@
$: populateItems(term)
const populateItems = throttle(300, term => {
- items = $search.searchValues(term).slice(0, 30)
+ items = $search.searchValues(term).slice(0, 5)
})
const setIndex = (newIndex: number, block: any) => {
diff --git a/src/routes/settings/about/+page.svelte b/src/routes/settings/about/+page.svelte
index 9cc42533..49570d46 100644
--- a/src/routes/settings/about/+page.svelte
+++ b/src/routes/settings/about/+page.svelte
@@ -2,7 +2,7 @@
import Link from "@lib/components/Link.svelte"
import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte"
- import {nostr} from '@app/state'
+ import {entityLink} from '@app/state'
const nprofile =
"nprofile1qqsf03c2gsmx5ef4c9zmxvlew04gdh7u94afnknp33qvv3c94kvwxgspz4mhxue69uhhyetvv9ujuerpd46hxtnfduhsz9rhwden5te0wfjkcctev93xcefwdaexwtcpzdmhxue69uhhqatjwpkx2urpvuhx2ue0vamm57"
@@ -34,7 +34,7 @@
Built with 💜 by
- @hodlbod
+ @hodlbod