news-android
news-android copied to clipboard
Articles marked as read via web app -> sidebar -> Unread articles -> Mark read show as unread in Android app
This issues is similar to (or a possible duplicate of) #975.
From a web app, marking a single article, a feed or a folder as read works properly, with Android app seeing them as read, but when going web app -> sidebar -> Unread articles (or All articles) -> Mark read, these articles still show as unread in the Android app. Over time I've accumulated around 3400 unread articles in the Android app while there are no unread articles in the web app.
Nextcloud Android app: v0.9.9.75 Nextcloud News web app: v18.1.0 Nextcloud: v24.0.3
Happens to me as well, also with latest News/Android app on NC24. @David-Development if you need help to debug this, feel free to ping me :-)
Thank you for the report. really weird.. classic example of .. works on my machine 😅
I'm running Nextcloud 24.0.3, and News v18.1.0 as well.. can't reproduce the issue. If I mark a whole feed as read in the web ui the changes are reflected in the app. If I mark a single item as read it also gets synced to the app properly.. 🤔
Thanks for replying! Those things work for me too - marking a single item, a whole feed, or a folder in web UI as read is properly synced and Android app sees them as read immediately.
What doesn't work for me is if I go this route: open web UI -> click on Unread articles button in the sidebar (so all unread articles from all feeds and folders are displayed in one unified view) -> click on the button with three dots next to it -> Mark read. When marking articles as read this way, they remain unread in the Android app. Same thing happens if you replace Unread articles with All articles button.
@markochk Oh okay, thanks for the clarification. So basically you are marking all unread items in your news app (web) as read in a single transaction. The only thing I can think of that could go wrong is that the response from the server is too large for the app to handle (e.g. too many items were changed). However that wouldn't explain why consecutive syncs work properly.
How many articles are usually unread when you press that button?
@Grotax Do you think this could be related to https://github.com/nextcloud/news-android/issues/975 as well?
Not sure, I don't think it is directly related. Since this issue was already fixed in 18.1.0. updating was failing because we didn't update the timestamp when marking them as read.
But when I have time I will check again, maybe there is some difference in when the api marks something as read compared to the UI.
How many articles are usually unread when you press that button?
Max 70-80, but it happens even if it's as few as 10 articles.
Something odd just happened: I haven't used the Android app in a while (because of this issue), so after your replies I openened it to check, expecting to see the unread article count in the thousands, but it showed the same value as in the web app (only 58). Now, checking all unread articles as read in the web app still didn't make them show as read in the Android app, but I think it's weird the unread article count was the same as in web app.
Nextcloud Android app: v0.9.9.76 Nextcloud News web app: v18.1.1 Nextcloud: v24.0.5
What DB server software do you use?
Nextcloud > Settings > System > Database prints:
Type: mysql
Version: 10.6.7
Size: 125.7 MB
mysql --version prints:
mysql Ver 15.1 Distrib 10.6.7-MariaDB, for debian-linux-gnu (aarch64) using EditLine wrapper
I hope this is what you were asking for; sorry if it's not.
If it's of any use, syncing things like files, CardDAV, CalDAV etc. is pretty much instantaneous.
I can confirm this issue. Mark a single article as read in Android app or WebGUI, sync works in both directions. Mark a whole group as read in Android app or WebGUI, sync works for the just marked articles in both directions. Mark all unread articles in "All unread items" as read in WebGUI, Android shows them still as unread. Mark all unread articles in "All unread items" as read in Android, sync to WebGUI works.
NextCloud 26.0.0 Android News App 0.9.9.75
Thanks for the testing, I think the issue is in https://github.com/nextcloud/news/blob/master/lib/Db/ItemMapperV2.php I will check when I have time, if it is what I think it should be easy to fix
Can this be the same root cause, https://github.com/nextcloud/news-android/issues/1117 ?
Yes very likely, I think I found the problem, the code that handles this specific update is different to the Feed update or single item update (didn't check folder) and there the update of the timestamp was missing. Since the sync is based on timestamps the following will happen.
You mark feeds on the server as read - timestamp not updated If android app already had the item it won't see a change -> items on android still marked as unread
Should be easy to fix already made a change only need to adjust tests, lint,... :)
Wow! Thanks. I applied PR to my server and will report back :)