mirror of
https://github.com/flarum/core.git
synced 2025-02-24 19:23:01 +01:00
Allow discussion list to be refreshed without clearing it
This commit is contained in:
parent
26c87de317
commit
61a06abd59
@ -123,12 +123,17 @@ export default class DiscussionList extends Component {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
refresh() {
|
||||
this.loading = true;
|
||||
this.discussions = [];
|
||||
refresh(clear = true) {
|
||||
if (clear) {
|
||||
this.loading = true;
|
||||
this.discussions = [];
|
||||
}
|
||||
|
||||
this.loadResults().then(
|
||||
this.parseResults.bind(this),
|
||||
return this.loadResults().then(
|
||||
results => {
|
||||
this.discussions = [];
|
||||
this.parseResults(results);
|
||||
},
|
||||
() => {
|
||||
this.loading = false;
|
||||
m.redraw();
|
||||
|
Loading…
x
Reference in New Issue
Block a user