jerboa icon indicating copy to clipboard operation
jerboa copied to clipboard

Upvote will not be displayed in feed if post is upvoted when opened

Open Snow4DV opened this issue 2 years ago • 4 comments

Jerboa Version Latest from main 0dab56d

Android version + phone Android 12/ OP7Pro

Describe the bug Upvote will not be displayed in feed if post is upvoted when opened. Maybe post in feed and opened post should share view model? At the moment only id of post is passed when opening post's activity

To Reproduce Steps to reproduce the behavior:

  1. Go to feed
  2. Click on any post
  3. Upvote
  4. Close post
  5. See that there's no upvote despite the fact that it was just upvoted

Snow4DV avatar Jun 29 '23 16:06 Snow4DV

Verified.

dessalines avatar Feb 10 '24 22:02 dessalines

@MV-GH What do you think would be a good way to handle this? I'm out of ideas and its definitely one of the bigger annoyances.

dessalines avatar Feb 14 '24 19:02 dessalines

We have the infrastructure already to handle this, I just haven't had the the time to Fully implement it. Take the same approach we do with read status. When read is updated put thr whole post on the navigationstack. In the feed there is an optional on back which updates the feed with that comment.

Now to solve this for all attributes we can take a more general approach:

  • Intercept back, pop post on nav stack
  • proxy the set of the Post ApiState on set also pop the post on the set

MV-GH avatar Feb 14 '24 19:02 MV-GH

I have also ideas to solve backspace bug, we can just use the old view system text thing and wrap in a composable, same way we do with markdown that is also a AndroidView

But only for big text areas. I expect other issues so minimize its usage.

MV-GH avatar Feb 14 '24 19:02 MV-GH