mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 07:22:15 +08:00
Fix index result caching
This commit is contained in:
parent
05a4662a02
commit
7dd49cb445
|
@ -24,7 +24,7 @@ export default Ember.Controller.extend(UseComposer, Paneable, {
|
|||
|
||||
var controller = this;
|
||||
return this.saveAndDismissComposer(discussion).then(function(discussion) {
|
||||
controller.get('index').send('refresh');
|
||||
controller.get('index').send('loadResults');
|
||||
controller.transitionToRoute('discussion', discussion);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -113,9 +113,8 @@ export default Ember.Controller.extend({
|
|||
model.removeObject(model.findBy('content', discussion));
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
loadResults: function() {
|
||||
var controller = this;
|
||||
controller.set('model', Ember.ArrayProxy.create());
|
||||
controller.set('resultsLoading', true);
|
||||
controller.getResults().then(function(results) {
|
||||
controller
|
||||
|
|
|
@ -16,7 +16,7 @@ export default Ember.Route.extend(AddCssClassToBody, {
|
|||
controller.set('model', model);
|
||||
|
||||
if (!model.get('length')) {
|
||||
controller.send('refresh');
|
||||
controller.send('loadResults');
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user