mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Experimental: Show a blue bar for unread ahead of you
This commit is contained in:
parent
6875007366
commit
276d139624
@ -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}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user