diff --git a/digest.js b/digest.js index 886fbce89..4faee1f6c 100644 --- a/digest.js +++ b/digest.js @@ -5,6 +5,14 @@ var _active_feed_offset = false; var _update_timeout = false; var _feedlist_expanded = false; +function article_appear(article_id) { + try { + new Effect.Appear('A-' + article_id); + } catch (e) { + exception_error("article_appear", e); + } +} + function catchup_feed(feed_id, callback) { try { @@ -165,8 +173,8 @@ function view(article_id, dismiss_only) { catchup_article(article_id, function() { - viewfeed(_active_feed_id, _active_feed_offset); - update(); + viewfeed(_active_feed_id, _active_feed_offset, false, true); + update(); }); return dismiss_only != true; @@ -175,7 +183,7 @@ function view(article_id, dismiss_only) { } } -function viewfeed(feed_id, offset) { +function viewfeed(feed_id, offset, replace, no_effects) { try { if (!feed_id) feed_id = _active_feed_id; @@ -186,6 +194,8 @@ function viewfeed(feed_id, offset) { offset = _active_feed_offset + offset; } + if (replace == undefined) replace = (offset == 0); + var query = "backend.php?op=rpc&subop=digest-update&feed_id=" + param_escape(feed_id) + "&offset=" + offset; @@ -195,7 +205,7 @@ function viewfeed(feed_id, offset) { parameters: query, onComplete: function(transport) { fatal_error_check(transport); - parse_headlines(transport, offset == 0); + parse_headlines(transport, replace, no_effects); set_selected_feed(feed_id); _active_feed_offset = offset; } }); @@ -285,7 +295,7 @@ function add_feed_entry(feed) { } } -function add_headline_entry(article, feed) { +function add_headline_entry(article, feed, no_effects) { try { var icon_part = ""; @@ -321,8 +331,11 @@ function add_headline_entry(article, feed) { else publ_part = ""; + var style = ""; - var tmp_html = "