Allow discussion list to be refreshed without clearing it

This commit is contained in:
Toby Zerner
2015-08-04 19:13:42 +09:30
parent 26c87de317
commit 61a06abd59

View File

@ -123,12 +123,17 @@ export default class DiscussionList extends Component {
* *
* @public * @public
*/ */
refresh() { refresh(clear = true) {
this.loading = true; if (clear) {
this.discussions = []; this.loading = true;
this.discussions = [];
}
this.loadResults().then( return this.loadResults().then(
this.parseResults.bind(this), results => {
this.discussions = [];
this.parseResults(results);
},
() => { () => {
this.loading = false; this.loading = false;
m.redraw(); m.redraw();