FIX: Never show the "Back" button when close to the bottom of the timeline

This commit is contained in:
Robin Ward 2016-06-07 11:19:09 -04:00
parent 5f92de8ede
commit b624c5cc94
1 changed files with 2 additions and 2 deletions

View File

@ -143,9 +143,9 @@ createWidget('timeline-scrollarea', {
this.attach('timeline-padding', { height: after }) this.attach('timeline-padding', { height: after })
]; ];
if (position.lastRead && position.lastRead < attrs.topic.posts_count) { if (position.lastRead) {
const lastReadTop = Math.round(position.lastReadPercentage * SCROLLAREA_HEIGHT); const lastReadTop = Math.round(position.lastReadPercentage * SCROLLAREA_HEIGHT);
if (lastReadTop > (before + SCROLLER_HEIGHT)) { if ((lastReadTop > (before + SCROLLER_HEIGHT)) && (lastReadTop < (SCROLLAREA_HEIGHT - SCROLLER_HEIGHT))) {
result.push(this.attach('timeline-last-read', { top: lastReadTop, lastRead: position.lastRead })); result.push(this.attach('timeline-last-read', { top: lastReadTop, lastRead: position.lastRead }));
} }
} }