mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
* Fixes #945 - Incorrect Scrubber count value Clicking and dragging the Scrubber beyond the final post causes the counter to exceed the total post count. This commit fixes that issue. * Updated post calculating logic
This commit is contained in:
parent
619561cf56
commit
3c6429aba8
|
@ -61,7 +61,7 @@ export default class PostStreamScrubber extends Component {
|
|||
const unreadPercent = count ? Math.min(count - this.index, unreadCount) / count : 0;
|
||||
|
||||
const viewing = app.translator.transChoice('core.forum.post_scrubber.viewing_text', count, {
|
||||
index: <span className="Scrubber-index">{retain || formatNumber(Math.ceil(this.index + this.visible))}</span>,
|
||||
index: <span className="Scrubber-index">{retain || formatNumber(Math.min(Math.ceil(this.index + this.visible), count))}</span>,
|
||||
count: <span className="Scrubber-count">{formatNumber(count)}</span>
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user