From 69f529110484f7c995b43f28dffe558ffd361ae8 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Wed, 4 Mar 2026 13:58:26 -0500 Subject: [PATCH] Continue implementing anonymous read posts. --- .../infinityforreddit/readpost/ReadPostModification.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostModification.java b/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostModification.java index ce0cc3ce..811386a6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostModification.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/ReadPostModification.java @@ -22,6 +22,11 @@ public class ReadPostModification { } readPostDao.insert(new ReadPost(username, postId, readPostType)); + if (readPostType == ReadPostType.ANONYMOUS_UPVOTED_POSTS) { + readPostDao.deleteReadPost(username, postId, ReadPostType.ANONYMOUS_DOWNVOTED_POSTS); + } else if (readPostType == ReadPostType.ANONYMOUS_DOWNVOTED_POSTS) { + readPostDao.deleteReadPost(username, postId, ReadPostType.ANONYMOUS_UPVOTED_POSTS); + } } }); }