hotfix: posts midsing
This commit is contained in:
1 parent
b21c922d2c
commit
1c5548471b
1 file changed
+2
-48
@@ -53,7 +53,7 @@
|
|||||||
return Array.from(urlMap.values())
|
return Array.from(urlMap.values())
|
||||||
}
|
}
|
||||||
|
|
||||||
$: combinedPosts = combineCrossposts(posts)
|
$: combinedPosts = posts
|
||||||
|
|
||||||
let viewPost: number = -1
|
let viewPost: number = -1
|
||||||
</script>
|
</script>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
</Placeholder>
|
</Placeholder>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
{#each combinedPosts as post, index}
|
{#each posts as post, index}
|
||||||
{#if !($userSettings.hidePosts.deleted && post.post.deleted) && !($userSettings.hidePosts.removed && post.post.removed)}
|
{#if !($userSettings.hidePosts.deleted && post.post.deleted) && !($userSettings.hidePosts.removed && post.post.removed)}
|
||||||
<li
|
<li
|
||||||
in:fly|global={{
|
in:fly|global={{
|
||||||
@@ -97,53 +97,7 @@
|
|||||||
? ''
|
? ''
|
||||||
: ''}"
|
: ''}"
|
||||||
>
|
>
|
||||||
<button
|
|
||||||
slot="badges"
|
|
||||||
class:hidden={!post.withCrossposts}
|
|
||||||
on:click={() => {
|
|
||||||
if (viewPost == post.post.id) viewPost = -1
|
|
||||||
else viewPost = post.post.id
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{#if post.withCrossposts}
|
|
||||||
<Badge
|
|
||||||
class="z-10 backdrop-blur-xl hover:brightness-110 cursor-pointer transition-all"
|
|
||||||
color="gray-subtle"
|
|
||||||
>
|
|
||||||
{#if viewPost == post.post.id}
|
|
||||||
<Icon mini src={Minus} size="14" />
|
|
||||||
{:else}
|
|
||||||
<Icon mini src={Plus} size="14" />
|
|
||||||
{/if}
|
|
||||||
{post.crossposts.length} crosspost{post.crossposts.length == 1
|
|
||||||
? ''
|
|
||||||
: 's'}
|
|
||||||
</Badge>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
</Post>
|
</Post>
|
||||||
{#if post.withCrossposts && viewPost == post.post.id}
|
|
||||||
<div
|
|
||||||
transition:slide|global={{
|
|
||||||
axis: 'y',
|
|
||||||
duration: 500,
|
|
||||||
easing: expoOut,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="text-sm flex flex-row gap-2 items-center"
|
|
||||||
class:my-4={$userSettings.view == 'card'}
|
|
||||||
>
|
|
||||||
Crossposts <hr class="w-full dark:border-zinc-800" />
|
|
||||||
{post.crossposts.length}
|
|
||||||
</span>
|
|
||||||
{#each post.crossposts as crosspost, index}
|
|
||||||
<div class="w-full transition-all mb-4">
|
|
||||||
<Post post={crosspost} view={$userSettings.view} />
|
|
||||||
</div>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
Reference in new issue
Block a user