1
0
mirror of https://github.com/flarum/core.git synced 2025-06-29 14:17:07 +02:00

Defer clearing discussion list on discussion start

This prevents an edge case where `app.discussions` is considered empty while the new page is loading, and as a result, the side pane isn't set as "enabled". Then, if the pane has previously been pinned, when the page loads and the side pane appears, it covers up part of the discussion page.

Fixes https://github.com/flarum/core/issues/2471
This commit is contained in:
Alexander Skvortsov
2020-11-26 01:54:28 -05:00
parent d09d4bc507
commit 102e76b084

View File

@ -100,7 +100,7 @@ export default class DiscussionComposer extends ComposerBody {
.save(data)
.then((discussion) => {
this.composer.hide();
app.discussions.refresh();
app.discussions.refresh({ deferClear: true });
m.route.set(app.route.discussion(discussion));
}, this.loaded.bind(this));
}