feat: add ability to hide deleted or removed posts (#71)
* feat: add ability to hide deleted or removed posts
Add hidePosts.{deleted,removed} settings to control whether or not to
display posts that have been marked as deleted or removed. By default,
these are enabled (ie. hidden) to correspond to Lemmy-UI behavior.
Currently, we only hide these posts for the front page and community
pages.
* feat: show removed posts by default
---------
Co-authored-by: Xyphyn <james@xylight.dev>
This commit is contained in:
1 parent
6ea697e3bc
commit
85468a5059
4 files changed
+33
No files matched your search
@@ -14,6 +14,7 @@
|
||||
import { profile } from '$lib/auth.js'
|
||||
import Sort from '$lib/components/lemmy/Sort.svelte'
|
||||
import { searchParam } from '$lib/util.js'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -74,6 +75,10 @@
|
||||
</div>
|
||||
{/if}
|
||||
{#each data.posts.posts as post, index (post.post.id)}
|
||||
{#if
|
||||
!($userSettings.hidePosts.deleted && post.post.deleted) &&
|
||||
!($userSettings.hidePosts.removed && post.post.removed)
|
||||
}
|
||||
<div
|
||||
in:fly={{
|
||||
y: -8,
|
||||
@@ -84,6 +89,7 @@
|
||||
>
|
||||
<Post {post} />
|
||||
</div>
|
||||
{/if}
|
||||
{/each}
|
||||
</section>
|
||||
<Pageination
|
||||
|
||||
Reference in new issue
Block a user