From 5c3e3abf70885e828f863e5702392d5ff37e412a Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 26 Jun 2015 12:09:59 +0930 Subject: [PATCH] Constrain the unread part of the scrubber to after the handle --- framework/core/js/forum/src/components/post-scrubber.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/forum/src/components/post-scrubber.js b/framework/core/js/forum/src/components/post-scrubber.js index db473f9b2..dc8146b3f 100644 --- a/framework/core/js/forum/src/components/post-scrubber.js +++ b/framework/core/js/forum/src/components/post-scrubber.js @@ -62,7 +62,7 @@ export default class PostScrubber extends Component { var retain = this.subtree.retain(); var stream = this.props.stream; 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 return m('div.stream-scrubber.dropdown'+(this.disabled() ? '.disabled' : ''), {config: this.onload.bind(this), className: this.props.className}, [