mirror of
https://github.com/flarum/core.git
synced 2025-07-15 13:56:23 +02:00
Constrain the unread part of the scrubber to after the handle
This commit is contained in:
@ -62,7 +62,7 @@ export default class PostScrubber extends Component {
|
|||||||
var retain = this.subtree.retain();
|
var retain = this.subtree.retain();
|
||||||
var stream = this.props.stream;
|
var stream = this.props.stream;
|
||||||
var unreadCount = this.props.stream.discussion.unreadCount();
|
var unreadCount = this.props.stream.discussion.unreadCount();
|
||||||
var unreadPercent = unreadCount / this.count();
|
var unreadPercent = Math.min(this.count() - this.index(), unreadCount) / this.count();
|
||||||
|
|
||||||
// @todo clean up duplication
|
// @todo clean up duplication
|
||||||
return m('div.stream-scrubber.dropdown'+(this.disabled() ? '.disabled' : ''), {config: this.onload.bind(this), className: this.props.className}, [
|
return m('div.stream-scrubber.dropdown'+(this.disabled() ? '.disabled' : ''), {config: this.onload.bind(this), className: this.props.className}, [
|
||||||
|
Reference in New Issue
Block a user