mirror of
https://github.com/flarum/framework.git
synced 2025-03-23 05:35:15 +08:00
De-propify visible
This commit is contained in:
parent
bbd8136695
commit
f99f79e3c0
@ -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');
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user