Make threads the default page for spaces
This commit is contained in:
parent
d5cd751387
commit
fa8799e406
5 changed files with 7 additions and 7 deletions
|
|
@ -19,7 +19,7 @@
|
|||
const entity = id ? nip19.neventEncode({id, relays}) : addr.toNaddr()
|
||||
|
||||
// If we found this event on a relay that the user is a member of, redirect internally
|
||||
$: url = getMembershipUrls($userMembership).find(url => $trackerStore.hasRelay($event.id, url))
|
||||
$: url = getMembershipUrls($userMembership).find(url => $trackerStore.hasRelay($event?.id, url))
|
||||
$: root = $event?.kind === REPLY ? $event.tags.find(nthEq(0, 'E'))?.[1] : $event?.id
|
||||
$: href = url && root ? makeThreadPath(url, root) : entityLink(entity)
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@
|
|||
{/if}
|
||||
</div>
|
||||
<div in:fly={{delay: getDelay(true)}}>
|
||||
<SecondaryNavItem href={makeSpacePath(url, "threads")}>
|
||||
<SecondaryNavItem href={makeSpacePath(url)}>
|
||||
<Icon icon="notes-minimalistic" /> Threads
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
<SecondaryNavHeader>Your Rooms</SecondaryNavHeader>
|
||||
</div>
|
||||
<div transition:slide={{delay: getDelay()}}>
|
||||
<SecondaryNavItem href={makeSpacePath(url)}>
|
||||
<SecondaryNavItem href={makeSpacePath(url, GENERAL)}>
|
||||
<Icon icon="hashtag" />
|
||||
{GENERAL}
|
||||
</SecondaryNavItem>
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ export const createScroller = ({
|
|||
}: ScrollerOpts) => {
|
||||
let done = false
|
||||
|
||||
const check = async () => {
|
||||
const container = element.classList.contains("scroll-container")
|
||||
? element
|
||||
: element.closest(".scroll-container")
|
||||
const container = element.classList.contains("scroll-container")
|
||||
? element
|
||||
: element.closest(".scroll-container")
|
||||
|
||||
const check = async () => {
|
||||
if (container) {
|
||||
// While we have empty space, fill it
|
||||
const {scrollY, innerHeight} = window
|
||||
|
|
|
|||
Loading…
Reference in a new issue