Tiny Tiny RSS: Community

Collapsing article


#1

Before the latest refactoring, I was using a feature called toggle_expand which was collapsing the article similar to “Collapse article” button on the article header. The difference is when you click on the button, the article is not active anymore. With the key press, I would simply collapse the article and the use prev_article_noexpand, next_article_noexpand, I would move on.

I couldn’t figure out how to do that with the current version. It looks like there was a function called cdmCollapseArticle and it doesn’t exist anymore. Is there a way to achieve this?

Here’s what I had on the functions.php:

-                       "n" => "next_article",
-                       "p" => "prev_article",
+                       "n" => "next_article_noexpand",
+                       "p" => "prev_article_noexpand",


+                       "o" => "toggle_expand",
-                       "o" => "open_in_new_window",
+                       "v" => "open_in_new_window",

And in viewfeed.js:

@@ -1431,12 +1431,10 @@ function cdmExpandArticle(id, noexpand) {
        if (old_offset > new_offset)
                $("headlines-frame").scrollTop -= (old_offset - new_offset);
 
-       if (!noexpand) {
                if (catchup_id_batch.indexOf(id) == -1)
                        catchup_id_batch.push(id);
 
                catchupCurrentBatchIfNeeded();
-       }