Post/comment score irregularity (1 extra point is added) [Video]
Slide version: 5.3.3-alpha.5 (and 73d1e09) Android version: 6.0.1
When upvoting a post and refreshing, 1 extra point is added to the score. So if you upvote a post with score 1 and refresh, it will display 3 rather than 2. Downvoting and refreshing works properly.
Video: https://streamable.com/613m
@Nxt3 :(
Didn't read all the PRs and stuff on it because damn there were a fair few, but did you end up looking into the thing I suggested before switching server stuff around @Nxt3?
Load the score as is provided by the API in all scenarios, then inc/decrement the score when and only when the user taps on it (and only for that 'session', if you refresh the post would display the score given by the API)
This extra point is caused by the API. Go to desktop--upvote something and refresh. The score changes between refreshes all the time. There isn't much more I can do. I already did what @Alexendoo suggested, and that doesn't work as well as you thought.
It doesn't occur on the desktop, the reason it happens is because of https://github.com/ccrama/Slide/blob/master/app/src/main/java/me/ccrama/redditslide/SubmissionViews/PopulateSubmissionViewHolder.java#L1403
Reddit.com handles it how I described (submit a post, unupvote it and refresh, then upvote it, it will display 2), the only issue with it on android however is that when a submission gets recycled it's recreated but the score isn't refreshed, so scrolling up/down loses that state. That's the reason the intricate chain of increments/decrements started in the first place, not sure there's a good solution without storing something extra
I actually can't reproduce this. I'm upvoting something to 2pts--refreshing--and it's still at 2pts.
oh, dude; this has been fixed. I don't think the build you're on has this fix, @Controless. I spent a good portion of yesterday fixing this.
Still occurs on 73d1e094487334264d1a840e2511e1393cbb9564
Can confirm, occurring for me as well on the latest commit.
It is happening on every single post you up vote? Go to /r/testslideforreddit and attempt replication. This issue isn't happening consistently enough for me to fix. :/
Yes, unfortunately it does. Video: https://streamable.com/9sze
Ugh. It doesn't happen on every post for me. I already tried what @Alexendoo suggested, but ran into other problems.
I think I've finally fixed this with my last few commits :)