From 53410887c94157f3d11f2c30d92ff5d3d8a3a9bd Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Wed, 3 Dec 2014 18:57:53 -0500 Subject: Fix behavior to hide articles I do not like it since it is partly duplicated. We need to find something better. --- p/scripts/main.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/p/scripts/main.js b/p/scripts/main.js index 19eba206d..e48630d89 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -689,10 +689,15 @@ function init_stream(divStream) { divStream.on('click', '.flux a.read', function () { var active = $(this).parents(".flux"); - mark_read(active, false); - if (context['auto_remove_article']) { + if (context['auto_remove_article'] && active.hasClass('not_read')) { + var p = active.prev(); + var n = active.next(); + if (p.hasClass('day') && n.hasClass('day')) { + p.remove(); + } active.remove(); } + mark_read(active, false); return false; }); -- cgit v1.2.3