diff options
| author | 2014-12-03 18:57:53 -0500 | |
|---|---|---|
| committer | 2014-12-03 18:57:53 -0500 | |
| commit | 53410887c94157f3d11f2c30d92ff5d3d8a3a9bd (patch) | |
| tree | 6890434e1427fa0416ff8edd5dea87e2f04cad94 | |
| parent | 5617911644bf85718430bb096c4ae9a0a0e8c75c (diff) | |
Fix behavior to hide articles
I do not like it since it is partly duplicated. We need to find something better.
| -rw-r--r-- | p/scripts/main.js | 9 |
1 files 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; }); |
