Remove old stream instance when reloading the stream

closes #6472
This commit is contained in:
Steffen van Bergerem 2015-10-09 09:56:54 +02:00 committed by Jonne Haß
parent 1ad48d7ce3
commit dccad3f7e1

View file

@ -89,6 +89,10 @@ app.Router = Backbone.Router.extend({
//below here is oldness //below here is oldness
stream : function() { stream : function() {
if(app.page) {
app.page.unbindInfScroll();
app.page.remove();
}
app.stream = new app.models.Stream(); app.stream = new app.models.Stream();
app.stream.fetch(); app.stream.fetch();
app.page = new app.views.Stream({model : app.stream}); app.page = new app.views.Stream({model : app.stream});