Thelounge: Show unread marker in correct place when we load more

Created on 21 Dec 2016  路  4Comments  路  Source: thelounge/thelounge

Realised there isn't an issue for this.

When the last unread message is further back than what we get sent to the client, we get the unread marker at the top of the page, but when we click "load more", the marker doesn't go any further back.

Main reason being that as soon as we change channel, the server marks everything as read. So we need to have a way to know what message in the past is unread.

Bug help wanted

Most helpful comment

Not gonna lie, I hope this hits the top of the roadmap soon. Catching up on backlog from overnight is way more effort than I'm usually willing to expend without this. :laughing:

All 4 comments

So we need to have a way to know what message in the past is unread.

Server sends actual message id, so if you were to implement code that kept looking for that id during history load, it would eventually be found.

Since we're here, when loading a channel, scroll should be at the position of the unread marker (and there are nice UX ways to make it easy to jump to the most recent message in such situation).

In a first version we could make it so this applies only when there are less than, I don't know, 1k unread messages, otherwise having a lot of unread messages could kill a device's browser. Later on, the "load more" mechanism could exist in both directions (down only when in this situation), assuming loading more is not through a button anymore (#207).

Not gonna lie, I hope this hits the top of the roadmap soon. Catching up on backlog from overnight is way more effort than I'm usually willing to expend without this. :laughing:

Now that we have infinite scrolling (https://github.com/thelounge/lounge/pull/1318), this is a bit more noticeable, as no user action is required for the marker to be wrongly located.
We'd definitely appreciate some contribution here :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

McInkay picture McInkay  路  4Comments

dgw picture dgw  路  3Comments

Frotty picture Frotty  路  4Comments

creesch picture creesch  路  5Comments

McGriddle picture McGriddle  路  5Comments