Fix infinite scroll after changing aspects
This commit is contained in:
parent
2517653d34
commit
948725b946
3 changed files with 11 additions and 2 deletions
|
|
@ -13,6 +13,8 @@ Feature: infinite scroll
|
||||||
|
|
||||||
When I scroll down
|
When I scroll down
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
|
#FIXME
|
||||||
|
And I wait for the ajax to finish
|
||||||
Then I should see 30 posts
|
Then I should see 30 posts
|
||||||
|
|
||||||
When I follow "generic"
|
When I follow "generic"
|
||||||
|
|
@ -21,4 +23,5 @@ Feature: infinite scroll
|
||||||
|
|
||||||
When I scroll down
|
When I scroll down
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
|
And I wait for the ajax to finish
|
||||||
Then I should see 30 posts
|
Then I should see 30 posts
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ class ActionView::LogSubscriber
|
||||||
|
|
||||||
hash.merge(:layout => event.payload[:layout]) if event.payload[:layout]
|
hash.merge(:layout => event.payload[:layout]) if event.payload[:layout]
|
||||||
|
|
||||||
Rails.logger.info(hash)
|
#Rails.logger.info(hash)
|
||||||
end
|
end
|
||||||
alias :render_partial :render_template
|
alias :render_partial :render_template
|
||||||
alias :render_collection :render_template
|
alias :render_collection :render_template
|
||||||
|
|
@ -81,6 +81,7 @@ end
|
||||||
module ActiveRecord
|
module ActiveRecord
|
||||||
class LogSubscriber
|
class LogSubscriber
|
||||||
def sql(event)
|
def sql(event)
|
||||||
|
return
|
||||||
self.class.runtime += event.duration
|
self.class.runtime += event.duration
|
||||||
return unless logger.info?
|
return unless logger.info?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
InfiniteScroll.prototype.start = function() {
|
InfiniteScroll.prototype.start = function() {
|
||||||
Diaspora.widgets.subscribe("stream/reloaded", this.initialize);
|
var __bind = function(fn, me){
|
||||||
|
return function(){
|
||||||
|
return fn.apply(me, arguments);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
Diaspora.widgets.subscribe("stream/reloaded", __bind(this.initialize, this));
|
||||||
this.initialize();
|
this.initialize();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue