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

View File

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