From 328a244f92b05718d9c888cbe57c1dc18eb062a2 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 31 Mar 2016 09:35:19 +0900 Subject: [PATCH] Fix DiscussionRenamedPost not being redrawn when toggling Closes #428. --- js/forum/dist/app.js | 9 ++++++++- js/forum/src/components/DiscussionRenamedPost.js | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/js/forum/dist/app.js b/js/forum/dist/app.js index 6a816e829..4092c0f73 100644 --- a/js/forum/dist/app.js +++ b/js/forum/dist/app.js @@ -21274,9 +21274,16 @@ System.register('flarum/components/DiscussionRenamedPost', ['flarum/components/B babelHelpers.createClass(DiscussionRenamedPost, [{ key: 'init', value: function init() { + var _this2 = this; + babelHelpers.get(Object.getPrototypeOf(DiscussionRenamedPost.prototype), 'init', this).call(this); - this.expanded = true; + this.expanded = false; + + // Rerender the post content when we toggle the details. + this.subtree.check(function () { + return _this2.expanded; + }); } }, { key: 'icon', diff --git a/js/forum/src/components/DiscussionRenamedPost.js b/js/forum/src/components/DiscussionRenamedPost.js index 83731e42d..c97879c51 100644 --- a/js/forum/src/components/DiscussionRenamedPost.js +++ b/js/forum/src/components/DiscussionRenamedPost.js @@ -13,7 +13,12 @@ export default class DiscussionRenamedPost extends EventPost { init() { super.init(); - this.expanded = true; + this.expanded = false; + + // Rerender the post content when we toggle the details. + this.subtree.check( + () => this.expanded + ); } icon() {