Make "load more" in forums not appear incorrectly

The rendering of the link happens in an event handler, and the
collection's attributes were not getting set properly before the reset
event triggering the rendering occurred.

Originally reviewed in #4072
This commit is contained in:
Greg Price
2014-06-17 11:36:47 -04:00
parent 551cea9379
commit e049cfaf3b

View File

@@ -62,9 +62,9 @@ if Backbone?
new_threads = [new Thread(data) for data in response.discussion_data][0]
new_collection = _.union(models, new_threads)
Content.loadContentInfos(response.annotated_content_info)
@reset new_collection
@pages = response.num_pages
@current_page = response.page
@reset new_collection
error: error
sortByDate: (thread) ->