From f99f79e3c00e1471d15e73eca1b441ff7c18e4fa Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Thu, 9 Jul 2020 22:40:12 -0400 Subject: [PATCH] De-propify visible --- js/src/forum/components/PostStream.js | 2 +- js/src/forum/components/PostStreamScrubber.js | 4 ++-- js/src/forum/states/PostStreamState.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/src/forum/components/PostStream.js b/js/src/forum/components/PostStream.js index cd3f18fc7..931cd52ba 100644 --- a/js/src/forum/components/PostStream.js +++ b/js/src/forum/components/PostStream.js @@ -215,7 +215,7 @@ export default class PostStream extends Component { }); this.state.index = index + 1; - this.state.visible(visible); + this.state.visible = visible; if (period) this.state.description = dayjs(period).format('MMMM YYYY'); } diff --git a/js/src/forum/components/PostStreamScrubber.js b/js/src/forum/components/PostStreamScrubber.js index dd3595c70..40edc784a 100644 --- a/js/src/forum/components/PostStreamScrubber.js +++ b/js/src/forum/components/PostStreamScrubber.js @@ -144,7 +144,7 @@ export default class PostStreamScrubber extends Component { updateScrubberValues(options = {}) { const index = this.state.index; const count = this.state.count(); - const visible = this.state.visible() || 1; + const visible = this.state.visible || 1; const percentPerPost = this.percentPerPost(); const $scrubber = this.$(); @@ -297,7 +297,7 @@ export default class PostStreamScrubber extends Component { */ percentPerPost() { const count = this.state.count() || 1; - const visible = this.state.visible() || 1; + const visible = this.state.visible || 1; // To stop the handle of the scrollbar from getting too small when there // are many posts, we define a minimum percentage height for the handle diff --git a/js/src/forum/states/PostStreamState.js b/js/src/forum/states/PostStreamState.js index 93a12a66f..8095dca9b 100644 --- a/js/src/forum/states/PostStreamState.js +++ b/js/src/forum/states/PostStreamState.js @@ -29,7 +29,7 @@ class PostStreamState { * * @type {Number} */ - this.visible = m.prop(1); + this.visible = 1; /** * The description to render on the scrubber. @@ -328,7 +328,7 @@ class PostStreamState { * @return {Boolean} */ disabled() { - return this.visible() >= this.count(); + return this.visible >= this.count(); } /**