Some posts marked as read incorrectly
I'll be viewing /r/all and randomly, I'll see posts that look like I've viewed them before despite me never seeing this submission before.
Edit: It appears that I can go to a subreddit, tap on the first post in the list, and witness a submission a few below that also be marked as read at the same time. In other words, it's marking two posts as read at the same time.
I'm getting this too, but only while clicking on posts. It often marks the post below as read
So this is happening with me too. Just to confirm , this is not happening on the current alpha, right? If yes, then I think it is related to the comments feature I added. Git bisect at least is telling me so. I'll take a look at it tonight, but if anybody has time https://github.com/ccrama/Slide/commit/7f52804f1fbca137b0741ba6b57969ec67d7c47a is most probably the culprit commit.
Yeah, the issue is making the RecyclerView static and getting an inference for the ViewHolder, both no-nos on Android. Will fix
Thanks @ccrama . Let me know if you don't find time and want me to do it.
No worries @prashantkhurana , just did it. Ended up making it not run off of clicking on the adapter position, but instead opening the submission URL as a new window. This fixes the issue, and correctly marks as read (because opening the image marks as read anyway). Should work as expected after my next commit! Thanks for the find
Thanks. So that is what I had started with, when I started with the feature, but the issue then is that if you upvote, then the changes (in upvote icon) are not reflected back. Same happens with every other button. I verified this with your latest commit.
I don't think there is a way to get both to work in reality, what could be done is adding in an ActivityResult, similar to what I do to get voting to work from between the comment screen and list view
can you point me to that code?
Sure thing! https://github.com/ccrama/Slide/blob/master/app/src/main/java/me/ccrama/redditslide/Activities/MainActivity.java#L296
I don't know how easily we could integrate that into the CommentScreenSingle Activity, but if you'd like to take a look that would be greatly appreciated! Thanks
thanks! sure, I will have a look later tonight and hopefully make some progress. Without looking into it much, I am still intrigued by that static thing I did. What makes it mark 2 posts as seen.
Thank you! And well it's static, so the reference could have changed on you without you knowing (just a general code issue).
I think the main issue, though, was either that the adapterposition was wrong or the reference to the ViewHolder was incorrect
ohh yeah, that's a static issue, but I doubt that is what is happening here. It should still mark only 1. wrong one maybe, but still 1. Why it marks 2 things as read is weird to me. I'll give it a look also.
This is still an issue.
Happening to me too, posts marked read below the post I click
It's fixed now in the new PR