De-propify visible

This commit is contained in:
Alexander Skvortsov 2020-07-09 22:40:12 -04:00 committed by Franz Liedke
parent bbd8136695
commit f99f79e3c0
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4
3 changed files with 5 additions and 5 deletions

View File

@ -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');
}

View File

@ -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

View File

@ -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();
}
/**