fix: animation error with hidden items
This commit is contained in:
1 file changed
+41
-39
@@ -205,45 +205,47 @@
|
|||||||
{#snippet item(row)}
|
{#snippet item(row)}
|
||||||
<!--god svelte is gonna make me lose it-->
|
<!--god svelte is gonna make me lose it-->
|
||||||
{@const filter = new ReactiveState(filteredPosts[row])}
|
{@const filter = new ReactiveState(filteredPosts[row])}
|
||||||
{#if posts[row] && filter.value.action != 'hide'}
|
<li
|
||||||
<li
|
in:fly={row < 7
|
||||||
in:fly={row < 7
|
? { duration: 800, easing: expoOut, y: 24, delay: row * 50 }
|
||||||
? { duration: 800, easing: expoOut, y: 24, delay: row * 50 }
|
: { opacity: 1, duration: 0 }}
|
||||||
: { opacity: 1, duration: 0 }}
|
data-index={row}
|
||||||
data-index={row}
|
class={[
|
||||||
class={['relative post-container', row < 7 && '']}
|
'relative post-container',
|
||||||
>
|
filter.value.action == 'hide' && 'hidden',
|
||||||
<!--TODO make my component isolation not abysmal-->
|
row < 7 && '',
|
||||||
{#if filter.value.action == 'none'}
|
]}
|
||||||
<Post
|
>
|
||||||
bind:post={posts[row]}
|
<!--TODO make my component isolation not abysmal-->
|
||||||
hideCommunity={community}
|
{#if filter.value.action == 'none'}
|
||||||
view={(posts[row].post.featured_community ||
|
<Post
|
||||||
posts[row].post.featured_local) &&
|
bind:post={posts[row]}
|
||||||
settings.posts.compactFeatured
|
hideCommunity={community}
|
||||||
? 'compact'
|
view={(posts[row].post.featured_community ||
|
||||||
: settings.view}
|
posts[row].post.featured_local) &&
|
||||||
onhide={() => removePost(posts[row].post.id)}
|
settings.posts.compactFeatured
|
||||||
class="px-3 sm:px-6 hover:bg-slate-100/30 hover:dark:bg-zinc-900/30 transition-colors"
|
? 'compact'
|
||||||
></Post>
|
: settings.view}
|
||||||
{:else if filter.value.action == 'minimize'}
|
onhide={() => removePost(posts[row].post.id)}
|
||||||
<Button
|
class="px-3 sm:px-6 hover:bg-slate-100/30 hover:dark:bg-zinc-900/30 transition-colors"
|
||||||
onclick={() => {
|
></Post>
|
||||||
filteredPosts[row].action = 'none'
|
{:else if filter.value.action == 'minimize'}
|
||||||
filter.value.action = 'none'
|
<Button
|
||||||
listComp?.rerender()
|
onclick={() => {
|
||||||
}}
|
filteredPosts[row].action = 'none'
|
||||||
color="tertiary"
|
filter.value.action = 'none'
|
||||||
rounding="none"
|
listComp?.rerender()
|
||||||
icon={ArrowsPointingOut}
|
}}
|
||||||
class="text-slate-400 dark:text-zinc-600 w-full"
|
color="tertiary"
|
||||||
size="xs"
|
rounding="none"
|
||||||
>
|
icon={ArrowsPointingOut}
|
||||||
{$t('settings.lemmy.contentFilter.minimized')}
|
class="text-slate-400 dark:text-zinc-600 w-full"
|
||||||
</Button>
|
size="xs"
|
||||||
{/if}
|
>
|
||||||
</li>
|
{$t('settings.lemmy.contentFilter.minimized')}
|
||||||
{/if}
|
</Button>
|
||||||
|
{/if}
|
||||||
|
</li>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</VirtualList>
|
</VirtualList>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in new issue
Block a user