mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 17:57:04 +08:00
Fix pinned pane broken after discussion creation
The pane would appear but the page content would not shift to the right because the hasPane className would be missing
This commit is contained in:
parent
ef6040a0a8
commit
186e8be026
|
@ -101,7 +101,7 @@ export default class DiscussionComposer extends ComposerBody {
|
|||
.save(data)
|
||||
.then((discussion) => {
|
||||
this.composer.hide();
|
||||
app.discussions.refresh({ deferClear: true });
|
||||
app.discussions.refresh();
|
||||
m.route.set(app.route.discussion(discussion));
|
||||
}, this.loaded.bind(this));
|
||||
}
|
||||
|
|
|
@ -53,7 +53,9 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
|||
// page, then we don't want Mithril to redraw the whole page – if it did,
|
||||
// then the pane would redraw which would be slow and would cause problems with
|
||||
// event handlers.
|
||||
if (app.discussions.hasItems()) {
|
||||
// We will also enable the pane if the discussion list is empty but loading,
|
||||
// because the DiscussionComposer refreshes the list and redirects to the new discussion at the same time.
|
||||
if (app.discussions.hasItems() || app.discussions.isLoading()) {
|
||||
app.pane?.enable();
|
||||
app.pane?.hide();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user