diff --git a/CHANGELOG.md b/CHANGELOG.md index 875f3765..a333019e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [x] Avoid pruning profiles we know we'll use more often - [x] Re-write pool to remove dependency on nostr-tools.relay - [x] Add support for AUTH +- [x] Use COUNT for counting follows ## 0.2.18 diff --git a/ROADMAP.md b/ROADMAP.md index 20cf972b..ff27e808 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,11 +1,13 @@ # Current -- [ ] Merge COUNT -- [ ] Multiplex, charge past a certain usage level based on bandwidth +- [ ] Fix follows list modal - [ ] Fix compose, topics -- [ ] Fix onboarding workflow w/forced relays -- [ ] https://github.com/staab/coracle/issues/42 +- [ ] Fix onboarding workflow w/forced relays (skip relays step) + - [ ] Fix iOS/safari/firefox +- [ ] https://github.com/staab/coracle/issues/42 +- [ ] Multiplex, charge past a certain usage level based on bandwidth +- [ ] Move blog to https://twitter.com/fiatjaf/status/1638514052014940162 # Others @@ -20,6 +22,7 @@ # Custom views +- [ ] Link/embed good chat/DM micro-apps - [ ] Add QR code that pre-fills follows and relays for a new user - If logged in, open a detail page that shows the relays and people - If not logged in, pre-populate follows/relays in onboarding flow diff --git a/src/App.svelte b/src/App.svelte index 79b1de95..273ff22b 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -280,8 +280,10 @@ {:else if $modal.type === "person/share"} - {:else if $modal.type === "person/list"} - + {:else if $modal.type === "person/follows"} + + {:else if $modal.type === "person/followers"} + {:else if $modal.type === "message"}
{$modal.message}
diff --git a/src/agent/storage.ts b/src/agent/storage.ts index 2847b1b3..61f5ac83 100644 --- a/src/agent/storage.ts +++ b/src/agent/storage.ts @@ -239,12 +239,12 @@ export const watch = (names, f) => { } // Debounce refresh so we don't get UI lag - const refresh = throttle(300, async () => store.set(await f(...tables))) + store.refresh = throttle(300, async () => store.set(await f(...tables))) // Listen for changes listener.subscribe(name => { if (names.includes(name)) { - refresh() + store.refresh() } }) diff --git a/src/routes/PersonDetail.svelte b/src/routes/PersonDetail.svelte index 633f9431..3a718280 100644 --- a/src/routes/PersonDetail.svelte +++ b/src/routes/PersonDetail.svelte @@ -7,7 +7,7 @@ import {log} from "src/util/logger" import {renderContent, parseHex} from "src/util/html" import {numberFmt} from "src/util/misc" - import {displayPerson, Tags, toHex} from "src/util/nostr" + import {displayPerson, toHex} from "src/util/nostr" import Tabs from "src/partials/Tabs.svelte" import Content from "src/partials/Content.svelte" import Anchor from "src/partials/Anchor.svelte" @@ -36,7 +36,6 @@ let pubkey = toHex(npub) let following = false let muted = false - let followers = new Set() let followersCount = tweened(0, {interpolate, duration: 1000}) let person = getPersonWithFallback(pubkey) let loading = true @@ -111,6 +110,8 @@ if (count) { followersCount.set(count) } else { + const followers = new Set() + await network.load({ shouldProcess: false, relays: getRelays(), @@ -133,13 +134,11 @@ const setActiveTab = tab => navigate(routes.person(pubkey, tab)) const showFollows = () => { - const pubkeys = Tags.wrap(person.petnames).pubkeys() - - modal.set({type: "person/list", pubkeys}) + modal.set({type: "person/follows", pubkey}) } const showFollowers = () => { - modal.set({type: "person/list", pubkeys: Array.from(followers)}) + modal.set({type: "person/followers", pubkey}) } const follow = async () => { diff --git a/src/views/person/PersonList.svelte b/src/views/person/PersonList.svelte index c46f1a58..9b3f5063 100644 --- a/src/views/person/PersonList.svelte +++ b/src/views/person/PersonList.svelte @@ -1,19 +1,49 @@ {#each $people || [] as person} + {:else} + {/each}