From e6f59b834f6a0df42807b3f02ab3662f9d983940 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Thu, 15 Oct 2020 18:18:51 -0400 Subject: [PATCH] Default `force` attr to `true` on `LinkButton` This retains beta 13 behavior. --- js/src/common/components/LinkButton.js | 2 ++ js/src/forum/components/UserPage.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/src/common/components/LinkButton.js b/js/src/common/components/LinkButton.js index 2dd3f6f9b..9c10808b5 100644 --- a/js/src/common/components/LinkButton.js +++ b/js/src/common/components/LinkButton.js @@ -12,12 +12,14 @@ import Link from './Link'; * active. * - `href` The URL to link to. If the current URL `m.route()` matches this, * the `active` prop will automatically be set to true. + * - `force` Whether the page should be fully rerendered. Defaults to `true`. */ export default class LinkButton extends Button { static initAttrs(attrs) { super.initAttrs(attrs); attrs.active = this.isActive(attrs); + if (attrs.force === undefined) attrs.force = true; } view(vnode) { diff --git a/js/src/forum/components/UserPage.js b/js/src/forum/components/UserPage.js index cdf56116e..66bc22db6 100644 --- a/js/src/forum/components/UserPage.js +++ b/js/src/forum/components/UserPage.js @@ -135,7 +135,7 @@ export default class UserPage extends Page { items.add( 'posts', - + {app.translator.trans('core.forum.user.posts_link')} {user.commentCount()} , 100 @@ -143,7 +143,7 @@ export default class UserPage extends Page { items.add( 'discussions', - + {app.translator.trans('core.forum.user.discussions_link')} {user.discussionCount()} , 90