mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 13:09:33 -06:00
FIX: Reload messages after a bulk operation (#12569)
It did not show the updated state of the topic until user refreshed the page.
This commit is contained in:
parent
198c960b52
commit
27b297472a
@ -253,7 +253,7 @@ export default Controller.extend(ModalFunctionality, {
|
||||
if (this.isGroup) {
|
||||
params.group = this.groupFilter;
|
||||
}
|
||||
this.forEachPerformed(params, (t) => t.set("archived", true));
|
||||
this.performAndRefresh(params);
|
||||
},
|
||||
|
||||
moveMessagesToInbox() {
|
||||
@ -261,7 +261,7 @@ export default Controller.extend(ModalFunctionality, {
|
||||
if (this.isGroup) {
|
||||
params.group = this.groupFilter;
|
||||
}
|
||||
this.forEachPerformed(params, (t) => t.set("archived", false));
|
||||
this.performAndRefresh(params);
|
||||
},
|
||||
|
||||
unlistTopics() {
|
||||
|
@ -55,6 +55,7 @@ export default Controller.extend({
|
||||
|
||||
@action
|
||||
toggleBulkSelect() {
|
||||
this.selected.clear();
|
||||
this.toggleProperty("bulkSelectEnabled");
|
||||
},
|
||||
});
|
||||
|
@ -29,6 +29,10 @@ export default DiscourseRoute.extend({
|
||||
},
|
||||
|
||||
actions: {
|
||||
refresh() {
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
willTransition: function () {
|
||||
this._super(...arguments);
|
||||
this.controllerFor("user").set("pmView", null);
|
||||
|
@ -60,7 +60,7 @@
|
||||
{{#unless site.mobileView}}
|
||||
{{#if showToggleBulkSelect}}
|
||||
{{d-button icon="list" class="btn-default bulk-select" title="topics.bulk.toggle" action=(action "toggleBulkSelect")}}
|
||||
{{bulk-select-button selected=selected}}
|
||||
{{bulk-select-button selected=selected action=(route-action "refresh")}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user