Tiny Tiny RSS: Community

Auto-mark as read & On catchup show next feed lefts last few post as unread after switching to another feed


Set configuration:
ENABLE “On catchup show next feed”
ENABLE “Automatically mark articles as read”
ENABLE “Combined feed display”
DISABLE “Automatically expand articles in combined mode”

rest option is quite default one. For sure, my list of articles looks like this.

Describe the problem you’re having:

When I scrolling down and article is out of view, it’s marked as read. It’s correct. However, when there are last 1-3 articles, after scroll to bottom, new feed is switched according to option, however there stays few (1 to 3) articles as unread.

I have record video, as not sure, if I can explain it well…

tt-rss version (including git commit id):

Tiny Tiny RSS v18.8 (1cf69d4)

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:

Linux, Debian 9, PHP 5.6.37, PostgreSQL 9.4


articles are being marked as read in batches, unless the batch resets on feed switch articles should get marked after a bit, i think


So, if I keep it for a while, it should be marked then? It’s kind of strange anyway, that only one (or two) stays like this…
Will check, if will be marked later. Anyway it’s kind of weird such behaviour… (especialy if previous one are marked almost instantly).

EDIT: you are right… it has been marked after let say 10s afterwrds… So lets it keep as nice to have, more than bug :slight_smile:


don’t look at counters too much. they update after a certain delay. sometimes its faster, sometimes its slower.

generating counters is an expensive operation so it makes sense to stagger it.


Well, just upgraded (not sure, if related, probably not) and the readed articles stays unreaded forever now. It’s bit annoying actualy :frowning:
Wouldn there possible to implement some trigger, wich in case of moving to next feed will mark rest of articles as readed? It’s kind of stupid, that I need to mark them as read manually…

git pull origin master
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 3), reused 2 (delta 0)
Unpacking objects: 100% (5/5), done.
From https://tt-rss.org/git/tt-rss
 * branch            master     -> FETCH_HEAD
   1cf69d4..df0115f  master     -> origin/master
Updating 1cf69d4..df0115f
 plugins/shorten_expanded/init.js | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)


the change above is definitely unrelated, i agree though that this behavior is not optimal

i’ll try to take a look next week


Amazing. Thank you!!


This is definitely a bug. The last message in a feed stays unread although the auto-next-feed jump has been performed as nicely visible in TheError’s video. Aka: While other actions may have an asynchronous update delay (e.g. in the counter updates) this last item stays unread forever (or until manually clicking it).
So this very nice “scroll past stuff and mark it read while doing so” usage pattern is broken currently.

Could you please take a look at why that single item is not set to read status?


Hi, long ago I tried to solve it without real success, since then I use the patch below which makes it work nicely. Not 100% of the time, though…

# git diff js/viewfeed.js
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 2333280..fd8c016 100755
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -1200,7 +1200,7 @@ function headlines_scroll_handler(e) {
                        $$("#headlines-frame > div[id*=RROW][class*=Unread]").each(
                                function(child) {
                                        if (child.hasClassName("Unread") && $("headlines-frame").scrollTop >
-                                                       (child.offsetTop + child.offsetHeight/2)) {
+                                                       (child.offsetTop + child.offsetHeight - 50)) { // otherwise single articles are not made read

                                                var id = child.getAttribute("data-article-id")

@@ -1212,16 +1212,22 @@ function headlines_scroll_handler(e) {


+                       // w hints:
+                       // reason that scroll over sometimes does nothing:
+                       // "rate-limit" and "_last_headlines_update" above makes this possibly never called: ugly
+                       // better: a bg thread that observes some scrollpos variable!!!
                        if (_infscroll_disable) {
                                var child = $$("#headlines-frame div[id*=RROW]").last();
                                if (child && $("headlines-frame").scrollTop >
-                                               (child.offsetTop + child.offsetHeight - 50)) {
+                                               (child.offsetTop + child.offsetHeight - 10)) { // 10: first make articles as read!

                                        console.log("we seem to be at an end");

                                        if (getInitParam("on_catchup_show_next_feed") == "1") {
-                                               openNextUnreadFeed();
+                                               // _infscroll_disable == 1 if all articles loaded!
+                                               _infscroll_disable = 0; // ugly: prevent skipping of feeds, this disables this until next feed *really* shown
+                                               setTimeout(openNextUnreadFeed, 750); // to avoid that inertia/momentum scrolling makes next feed read!


That’s really helpful @wolfgang. The improved offsets help quite a lot in the use case I was struggling with. Let’s see whether @fox comes up with an idea to make this function less error-prone. He knows the inner workings of tt-rss best. Obviously :). But with your improved offsets it at least works now. Thanks!


the workaround above is probably okay although the first part shouldn’t be needed and i’d like to keep things being marked as read when half-scrolled, as it is now.

i don’t think this behavior / combination of options has ever been intended; i also don’t think auto-opening new feeds while scrolling is a good idea, originally this was only supposed to work when catching up feeds manually using a dedicated button or a hotkey - not sure if auto mark as read was a thing back then.

// better: a bg thread

no such thing in a javascript VM.