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); + } } }); }