Commit 8860d5bf by Ibrahim Awwal

Fix hiding the more pages button.

parent de92fffe
...@@ -18,6 +18,7 @@ if Backbone? ...@@ -18,6 +18,7 @@ if Backbone?
@collection.on "reset", (discussion) => @collection.on "reset", (discussion) =>
board = $(".current-board").html() board = $(".current-board").html()
@displayedCollection.current_page = discussion.current_page @displayedCollection.current_page = discussion.current_page
@displayedCollection.pages = discussion.pages
@displayedCollection.reset discussion.models @displayedCollection.reset discussion.models
# TODO: filter correctly # TODO: filter correctly
# target = _.filter($("a.topic:contains('#{board}')"), (el) -> el.innerText == "General" || el.innerHTML == "General") # target = _.filter($("a.topic:contains('#{board}')"), (el) -> el.innerText == "General" || el.innerHTML == "General")
...@@ -121,9 +122,6 @@ if Backbone? ...@@ -121,9 +122,6 @@ if Backbone?
@$(".more-pages").html('<div class="loading-animation"></div>') @$(".more-pages").html('<div class="loading-animation"></div>')
@$(".more-pages").addClass("loading") @$(".more-pages").addClass("loading")
@collection.retrieveAnotherPage(@current_search, @discussionIds, @sortBy) @collection.retrieveAnotherPage(@current_search, @discussionIds, @sortBy)
if not @collection.hasMorePages()
$(".more-pages").hide()
renderThread: (thread) => renderThread: (thread) =>
content = $(_.template($("#thread-list-item-template").html())(thread.toJSON())) content = $(_.template($("#thread-list-item-template").html())(thread.toJSON()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment