From ffd43e448bc1687cd4847f1589f37091748a4e37 Mon Sep 17 00:00:00 2001 From: David Kaspar Date: Fri, 15 Nov 2024 12:54:59 +0100 Subject: [PATCH] filter out drafts that are not same author as current account --- .../amethyst/ui/screen/loggedIn/threadview/ThreadFeedView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/threadview/ThreadFeedView.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/threadview/ThreadFeedView.kt index fb55ef542..28016b70b 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/threadview/ThreadFeedView.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/threadview/ThreadFeedView.kt @@ -268,7 +268,7 @@ fun RenderThreadFeed( contentPadding = FeedPadding, state = listState, ) { - itemsIndexed(items.list, key = { _, item -> item.idHex }) { index, item -> + itemsIndexed(items.list.filter { !it.isDraft() || (it.author?.pubkeyHex == accountViewModel.account.userProfile().pubkeyHex) }, key = { _, item -> item.idHex }) { index, item -> val level = viewModel.levelFlowForItem(item).collectAsStateWithLifecycle(0) val modifier =