mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 02:52:44 +08:00
Delays loading spinner when switching between tabs.
This commit is contained in:
parent
d84b2b5117
commit
a561cbc5fa
|
@ -10,11 +10,18 @@
|
|||
Discourse.DiscoveryRoute = Discourse.Route.extend(Discourse.OpenComposer, {
|
||||
actions: {
|
||||
loading: function() {
|
||||
this.controllerFor('discovery').set('loading', true);
|
||||
var controller = this.controllerFor('discovery');
|
||||
|
||||
controller.set('scheduledSpinner', Ember.run.later(controller, function() {
|
||||
this.set('loading', true);
|
||||
},500));
|
||||
},
|
||||
|
||||
loadingComplete: function() {
|
||||
this.controllerFor('discovery').set('loading', false);
|
||||
var controller = this.controllerFor('discovery');
|
||||
|
||||
Ember.run.cancel(controller.get('scheduledSpinner'));
|
||||
controller.set('loading', false);
|
||||
},
|
||||
|
||||
didTransition: function() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user