diff --git a/lib/diaspora/user/querying.rb b/lib/diaspora/user/querying.rb index 377a4d193..d3e1cd99c 100644 --- a/lib/diaspora/user/querying.rb +++ b/lib/diaspora/user/querying.rb @@ -20,7 +20,7 @@ module Diaspora order_field = opts[:order].split.first.to_sym opts[:hidden] ||= false order_with_table = 'posts.' + opts[:order] - opts[:max_time] = Time.at(opts[:max_time]) if opts[:max_time].instance_of?(Fixnum) + opts[:max_time] = Time.at(opts[:max_time]) if opts[:max_time].is_a?(Integer) opts[:max_time] ||= Time.now + 1 select_clause ='DISTINCT posts.id, posts.updated_at AS updated_at, posts.created_at AS created_at' diff --git a/public/javascripts/publisher.js b/public/javascripts/publisher.js index ec0b816c5..680b9cbf3 100644 --- a/public/javascripts/publisher.js +++ b/public/javascripts/publisher.js @@ -346,8 +346,9 @@ var Publisher = { }); }, initialize: function() { - Diaspora.widgets.subscribe("stream/reloaded", Publisher.initialize); - + Publisher.cachedForm = Publisher.cachedSubmit = + Publisher.cachedInput = Publisher.cachedHiddenInput = false; + Publisher.bindServiceIcons(); Publisher.bindPublicIcon(); Publisher.bindAspectToggles(); @@ -368,4 +369,5 @@ var Publisher = { $(document).ready(function() { Publisher.initialize(); + Diaspora.widgets.subscribe("stream/reloaded", Publisher.initialize); });