From 775094356c2ef9f94ce542f4349a1ae4d7365ae4 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sat, 24 Jun 2023 10:49:34 -0400 Subject: [PATCH] Fixes new posts not showing up in the feed. --- .../vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt index 25e636f7b..e87eb451c 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/HomeNewThreadFeedFilter.kt @@ -32,7 +32,7 @@ class HomeNewThreadFeedFilter(val account: Account) : AdditiveFeedFilter() val followingKeySet = account.selectedUsersFollowList(account.defaultHomeFollowList) ?: emptySet() val followingTagSet = account.selectedTagsFollowList(account.defaultHomeFollowList) ?: emptySet() - val now = Date().time / 1000 + val oneMinuteInTheFuture = Date().time / 1000 + (1 * 60) // one minute in the future. val oneHr = 60 * 60 return collection @@ -43,7 +43,7 @@ class HomeNewThreadFeedFilter(val account: Account) : AdditiveFeedFilter() (it.author?.pubkeyHex in followingKeySet || (noteEvent.isTaggedHashes(followingTagSet))) && // && account.isAcceptable(it) // This filter follows only. No need to check if acceptable it.author?.let { !account.isHidden(it.pubkeyHex) } ?: true && - ((it.event?.createdAt() ?: 0) < now) && + ((it.event?.createdAt() ?: 0) < oneMinuteInTheFuture) && it.isNewThread() && ( (noteEvent !is RepostEvent && noteEvent !is GenericRepostEvent) || // not a repost