From 24114249513c15c69c5f240c9210a49c589bdd19 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 5 Jul 2013 14:19:12 +0200 Subject: make it possible to turn off mark read by scrolling --- js/app/directives/newsitemscroll.coffee | 4 +++- js/public/app.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/app/directives/newsitemscroll.coffee b/js/app/directives/newsitemscroll.coffee index 5d8345999..f0cf69543 100644 --- a/js/app/directives/newsitemscroll.coffee +++ b/js/app/directives/newsitemscroll.coffee @@ -37,7 +37,9 @@ angular.module('News').directive 'newsItemScroll', ['$rootScope', 'Config', scrolling = true , Config.ScrollTimeout - if markingRead + # dont scroll if the value is set to false or there is already + # a mark read request + if markingRead and elm.attr('news-item-scroll') == 'true' markingRead = false setTimeout -> markingRead = true diff --git a/js/public/app.js b/js/public/app.js index c345d54d5..680a411ad 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -285,7 +285,7 @@ License along with this library. If not, see . setTimeout(function() { return scrolling = true; }, Config.ScrollTimeout); - if (markingRead) { + if (markingRead && elm.attr('news-item-scroll') === 'true') { markingRead = false; setTimeout(function() { var $elems, feedItem, id, offset, _i, _len, _results; -- cgit v1.2.3