Skip to content

Commit

Permalink
ensure read items are counted for loading more items (fix fossar#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
niol committed Dec 22, 2016
1 parent 2f87dd1 commit f6a0a0b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/js/selfoss-events-entriestoolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ selfoss.events.entriesToolbar = function(parent) {
url: $('base').attr('href') + (unread ? 'mark/' : 'unmark/') + id,
data: { ajax: true },
type: 'POST',
success: function(data) {
if( unread )
selfoss.filter.extra_ids.push(id);
},
error: function(jqXHR, textStatus, errorThrown) {
// rollback ui changes
updateStats(!unread);
Expand Down
3 changes: 3 additions & 0 deletions public/js/selfoss-events-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ selfoss.events.navigation = function() {
$(this).addClass('active');

selfoss.filter.offset = 0;
selfoss.filter.extra_ids.length = 0;
selfoss.reloadList();

if(selfoss.isSmartphone())
Expand Down Expand Up @@ -74,6 +75,7 @@ selfoss.events.navigation = function() {
selfoss.filter.tag = $(this).find('span').html();

selfoss.filter.offset = 0;
selfoss.filter.extra_ids.length = 0;
selfoss.reloadList();

if(selfoss.isSmartphone())
Expand All @@ -99,6 +101,7 @@ selfoss.events.navigation = function() {
selfoss.filter.source = $(this).attr('id').substr(6);

selfoss.filter.offset = 0;
selfoss.filter.extra_ids.length = 0;
selfoss.reloadList();

if(selfoss.isSmartphone())
Expand Down
2 changes: 2 additions & 0 deletions public/js/selfoss-events-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ selfoss.events.search = function() {
// execute search
$('#search').removeClass('active');
selfoss.filter.offset = 0;
selfoss.filter.extra_ids.length = 0;
selfoss.filter.search = term;
selfoss.reloadList();

Expand Down Expand Up @@ -90,6 +91,7 @@ selfoss.events.search = function() {
}

selfoss.filter.offset = 0;
selfoss.filter.extra_ids.length = 0;
selfoss.filter.search = '';
$('#search-list').hide();
$('#search-list').html('');
Expand Down

0 comments on commit f6a0a0b

Please sign in to comment.