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