mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 20:13:38 +08:00
FIX: Never show the "Back" button when close to the bottom of the timeline
This commit is contained in:
parent
5f92de8ede
commit
b624c5cc94
|
@ -143,9 +143,9 @@ createWidget('timeline-scrollarea', {
|
|||
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);
|
||||
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 }));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user