fix loading message am message bus stuff
This commit is contained in:
parent
0e48e1c346
commit
b9698e8d2f
|
@ -39,7 +39,6 @@ Discourse.ListController = Ember.Controller.extend Discourse.Presence,
|
|||
Discourse.TopicList.list(current).then (items) =>
|
||||
@set('filterSummary', items.filter_summary)
|
||||
@set('filterMode', filterMode)
|
||||
@set('allLoaded', true) unless items.more_topics_url
|
||||
@set('loading', false)
|
||||
deferred.resolve(items)
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ window.Discourse.TopicList = Discourse.Model.extend
|
|||
Em.String.i18n('topics.no_' + @get('filter'))
|
||||
).property('topics', 'topics@each', 'filter', 'loaded')
|
||||
|
||||
|
||||
loadMoreTopics: ->
|
||||
promise = new RSVP.Promise()
|
||||
if moreUrl = @get('more_topics_url')
|
||||
|
|
|
@ -5,8 +5,6 @@ window.Discourse.FilteredListRoute = Discourse.Route.extend
|
|||
listController = @controllerFor('list')
|
||||
listController.set('canCreateTopic', false)
|
||||
listController.set('filterMode', '')
|
||||
listController.set('allLoaded', false)
|
||||
|
||||
|
||||
renderTemplate: ->
|
||||
@render 'listTopics', into: 'list', outlet: 'listView', controller: 'listTopics'
|
||||
|
|
|
@ -35,10 +35,6 @@
|
|||
{{/if}}
|
||||
|
||||
{{outlet listView}}
|
||||
|
||||
{{#if controller.allLoaded}}
|
||||
<h3>{{{i18n topics.footer}}}</h3>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -55,5 +55,9 @@
|
|||
{{/if}}
|
||||
</footer>
|
||||
|
||||
{{#if view.allLoaded}}
|
||||
<h3>{{{i18n topics.footer}}}</h3>
|
||||
{{/if}}
|
||||
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
|
|
@ -18,6 +18,10 @@ window.Discourse.ListTopicsView = Ember.View.extend Discourse.Scrolling, Discour
|
|||
|
||||
willDestroyElement: -> @unbindScrolling()
|
||||
|
||||
allLoaded: (->
|
||||
!@get('loading') && !@get('controller.content.more_topics_url')
|
||||
).property('loading', 'controller.content.more_topics_url')
|
||||
|
||||
didInsertElement: ->
|
||||
@bindScrolling()
|
||||
eyeline = new Discourse.Eyeline('.topic-list-item')
|
||||
|
|
|
@ -32,6 +32,7 @@ class MessageBus::Diagnostics
|
|||
end
|
||||
|
||||
MessageBus.subscribe('/_diagnostics/discover') do |msg|
|
||||
MessageBus.on_connect.call msg.site_id if MessageBus.on_connect
|
||||
MessageBus.publish '/_diagnostics/process-discovery', {
|
||||
pid: Process.pid,
|
||||
process_name: $0,
|
||||
|
@ -39,6 +40,7 @@ class MessageBus::Diagnostics
|
|||
uptime: (Time.now.to_f - start_time).to_i,
|
||||
hostname: hostname
|
||||
}, user_ids: [msg.data["user_id"]]
|
||||
MessageBus.on_disconnect.call msg.site_id if MessageBus.on_disconnect
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,8 +9,6 @@ class MessageBus::Rack::Middleware
|
|||
def self.start_listener
|
||||
unless @started_listener
|
||||
MessageBus.subscribe do |msg|
|
||||
p msg.channel
|
||||
p msg.message_id
|
||||
EM.next_tick do
|
||||
@@connection_manager.notify_clients(msg) if @@connection_manager
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue