Skip to content

Commit

Permalink
fix: double repost
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-ext committed Dec 23, 2023
1 parent 392538d commit d3c4af7
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions app/api/mutations/repost-post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ export const updatePostRepost = (post: SignalizedPost, repost: boolean) => {
const promise = mutate(repost);
const repostUri = post.viewer.repost;

if (post.viewer.repost.value) {
post.repostCount.value--;
} else {
post.repostCount.value++;
}

post.repostCount.value += repostUri.value ? -1 : 1;
repostUri.value = repost ? 'pending' : undefined;

Expand Down

0 comments on commit d3c4af7

Please sign in to comment.