Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
Don't refresh items twice after returning from sources
Browse files Browse the repository at this point in the history
This change triggers the onhashchange handler without sending
the reloadList ajax request, instead of triggering it only after the
request has been made and the items have already just been refreshed.
  • Loading branch information
seanrand committed Apr 23, 2013
1 parent 9e3951d commit 0da104c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion public/js/selfoss-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ var selfoss = {
if (selfoss.activeAjaxReq !== null)
selfoss.activeAjaxReq.abort();

if (location.hash == "#sources") {
location.hash = "";
return;
}

$('#content').addClass('loading').html("");

selfoss.activeAjaxReq = $.ajax({
Expand All @@ -153,7 +158,6 @@ var selfoss = {
$(document).scrollTop(0);
selfoss.events.entries();
selfoss.events.search();
location.hash = "";

// make unread itemcount red
if(data.unread>0)
Expand Down

0 comments on commit 0da104c

Please sign in to comment.