From d292974394b90f56c931d32133298def002428ee Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 28 Jun 2013 21:52:34 -0400 Subject: [PATCH] Fix bug multiple marked_as_read when open original link with keyboard shortcuts --- assets/js/app.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 344c86c..95bd391 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -34,6 +34,7 @@ request.onload = function() { + find_next_item(); remove_item(item_id); }; @@ -114,11 +115,6 @@ callback(response); } - - if (! response.result) { - - //window.alert('Unable to refresh this feed: ' + feed_id); - } } catch (e) {} } @@ -211,12 +207,8 @@ if (link) { - if (link.getAttribute("data-action") == "mark-read") { - - mark_as_read(link.getAttribute("data-item-id")); - find_next_item(); - } - + if (is_listing()) mark_as_read(link.getAttribute("data-item-id")); + link.removeAttribute("data-action"); link.click(); } }