Skip to content

Commit

Permalink
bug fix for dead timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
daveajones committed Dec 31, 2021
1 parent 0a3b720 commit 7d2edea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub async fn boosts(_ctx: Context) -> Response {
},
Err(_) => 0
};
if last_index > boostcount {
if last_index > boostcount && !old {
last_index -= boostcount;
}

Expand Down
2 changes: 1 addition & 1 deletion webroot/html/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h5 class="titleHeader">Helipad: Boost Tracker</h5>
<div class="msg_history"></div>
</div>
</div>
<div class="versionFooter">v0.1.5</div>
<div class="versionFooter"><a href="https://github.com/Podcastindex-org/helipad">v0.1.5</a></div>
</div>
</div>
</body>
Expand Down
10 changes: 7 additions & 3 deletions webroot/script/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(document).ready(function () {
var connection = null;
var messageIds = [];

getBoosts();
getBoosts(null, 20, true, true);

function getBoosts(startIndex, max, scrollToTop, old) {
var noIndex = false;
Expand Down Expand Up @@ -167,7 +167,7 @@ $(document).ready(function () {

//Show a message if still building
if ($('div.outgoing_msg').length == 0 && $('div.nodata').length == 0) {
inbox.prepend('<div class="nodata">No data to show yet. Building the initial database may take some time...</div>');
inbox.prepend('<div class="nodata">No data to show yet. Building the initial database may take some time. Check back in a few minutes...</div>');
}

//Load more link
Expand Down Expand Up @@ -202,7 +202,11 @@ $(document).ready(function () {

//Set a periodic checker for new boosts
setInterval(function () {
getBoosts(null, 20, true);
if ($('div.outgoing_msg').length === 0) {
getBoosts(null, 100, true, true);
} else {
getBoosts(null, 20, true, false);
}
}, 7000);

});
Expand Down

0 comments on commit 7d2edea

Please sign in to comment.