forked from coracle/flotilla
Small fixes/performance improvements
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
getPubkeyTagValues,
|
||||
getListTags,
|
||||
} from "@welshman/util"
|
||||
import {throttled, custom} from "@welshman/store"
|
||||
import {custom} from "@welshman/store"
|
||||
import {
|
||||
relays,
|
||||
handles,
|
||||
@@ -204,8 +204,8 @@
|
||||
setupAnalytics()
|
||||
|
||||
ready = initStorage("flotilla", 4, {
|
||||
relays: {keyPath: "url", store: throttled(3000, relays)},
|
||||
handles: {keyPath: "nip05", store: throttled(3000, handles)},
|
||||
relays: storageAdapters.fromCollectionStore("url", relays, {throttle: 3000}),
|
||||
handles: storageAdapters.fromCollectionStore("nip05", handles, {throttle: 3000}),
|
||||
freshness: storageAdapters.fromObjectStore(freshness, {
|
||||
throttle: 3000,
|
||||
migrate: migrateFreshness,
|
||||
@@ -251,6 +251,7 @@
|
||||
let unsubSpaces: any
|
||||
|
||||
userMembership.subscribe($membership => {
|
||||
console.log("subscribe")
|
||||
unsubSpaces?.()
|
||||
unsubSpaces = listenForNotifications()
|
||||
})
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {nip19} from "nostr-tools"
|
||||
import {onDestroy} from "svelte"
|
||||
import type {Readable} from "svelte/store"
|
||||
import {derived} from "svelte/store"
|
||||
import type {Editor} from "svelte-tiptap"
|
||||
import {page} from "$app/stores"
|
||||
import {sleep, ctx} from "@welshman/lib"
|
||||
import type {TrustedEvent, EventContent} from "@welshman/util"
|
||||
@@ -17,6 +15,7 @@
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import PageBar from "@lib/components/PageBar.svelte"
|
||||
import Divider from "@lib/components/Divider.svelte"
|
||||
import type {getEditor} from "@app/editor"
|
||||
import MenuSpaceButton from "@app/components/MenuSpaceButton.svelte"
|
||||
import ChannelName from "@app/components/ChannelName.svelte"
|
||||
import ChannelMessage from "@app/components/ChannelMessage.svelte"
|
||||
@@ -92,7 +91,7 @@
|
||||
let loading = sleep(5000)
|
||||
let element: HTMLElement
|
||||
let scroller: Scroller
|
||||
let editor: Readable<Editor>
|
||||
let editor: ReturnType<typeof getEditor>
|
||||
|
||||
const elements = derived(events, $events => {
|
||||
const $elements = []
|
||||
|
||||
Reference in New Issue
Block a user