mirror of
https://github.com/discourse/discourse.git
synced 2025-04-03 05:39:41 +08: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) {
|
if (this.isGroup) {
|
||||||
params.group = this.groupFilter;
|
params.group = this.groupFilter;
|
||||||
}
|
}
|
||||||
this.forEachPerformed(params, (t) => t.set("archived", true));
|
this.performAndRefresh(params);
|
||||||
},
|
},
|
||||||
|
|
||||||
moveMessagesToInbox() {
|
moveMessagesToInbox() {
|
||||||
@ -261,7 +261,7 @@ export default Controller.extend(ModalFunctionality, {
|
|||||||
if (this.isGroup) {
|
if (this.isGroup) {
|
||||||
params.group = this.groupFilter;
|
params.group = this.groupFilter;
|
||||||
}
|
}
|
||||||
this.forEachPerformed(params, (t) => t.set("archived", false));
|
this.performAndRefresh(params);
|
||||||
},
|
},
|
||||||
|
|
||||||
unlistTopics() {
|
unlistTopics() {
|
||||||
|
@ -55,6 +55,7 @@ export default Controller.extend({
|
|||||||
|
|
||||||
@action
|
@action
|
||||||
toggleBulkSelect() {
|
toggleBulkSelect() {
|
||||||
|
this.selected.clear();
|
||||||
this.toggleProperty("bulkSelectEnabled");
|
this.toggleProperty("bulkSelectEnabled");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -29,6 +29,10 @@ export default DiscourseRoute.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
refresh() {
|
||||||
|
this.refresh();
|
||||||
|
},
|
||||||
|
|
||||||
willTransition: function () {
|
willTransition: function () {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
this.controllerFor("user").set("pmView", null);
|
this.controllerFor("user").set("pmView", null);
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
{{#unless site.mobileView}}
|
{{#unless site.mobileView}}
|
||||||
{{#if showToggleBulkSelect}}
|
{{#if showToggleBulkSelect}}
|
||||||
{{d-button icon="list" class="btn-default bulk-select" title="topics.bulk.toggle" action=(action "toggleBulkSelect")}}
|
{{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}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user