Experimental: Show a blue bar for unread ahead of you

This commit is contained in:
Robin Ward 2017-03-24 11:58:50 -07:00
parent 6875007366
commit 276d139624
1 changed files with 8 additions and 6 deletions

View File

@ -199,13 +199,15 @@ createWidget('timeline-scrollarea', {
this.attach('timeline-padding', { height: after })
];
if (hasBackPosition) {
if (position.lastRead > 1 && position.total > 5) {
const lastReadTop = Math.round(position.lastReadPercentage * SCROLLAREA_HEIGHT);
result.push(this.attach('timeline-last-read', {
top: lastReadTop,
lastRead: position.lastRead,
showButton
}));
if (hasBackPosition) {
result.push(this.attach('timeline-last-read', {
top: lastReadTop,
lastRead: position.lastRead,
showButton
}));
}
result.push(this.attach('timeline-unread-area', { top: lastReadTop}));
}