UX: Never show the back button if it's the last post

This commit is contained in:
Robin Ward 2016-06-14 12:02:24 -04:00
parent b42f28d4c3
commit 3d3ce56f52

View File

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