alphapapa / ement.el

A Matrix client for GNU Emacs
GNU General Public License v3.0
488 stars 44 forks source link

ement-room-retro leaves the original top-of-buffer date headers unchanged #237

Open phil-s opened 11 months ago

phil-s commented 11 months ago

The initial date headers at the top of the room buffer remain static, even after I've scrolled back and obtained prior history from previous days.

It would be good if ement-room-retro would re-process the preceding header (along with any others which should be added on account of the newly-inserted events, but I haven't attempted to find out whether there are any other problem cases).

By way of illustration, in the ement.el room I was seeing this at the top of the buffer:

@alphapapa:matrix.org set the canonical alias to <#ement.el:matrix.org>

2021-08-24 (Tuesday)

14:39
Membership: 2 joined (viz, phil.catalyst).
@alphapapa:matrix.org changed the room's avatar.

2023-11-02 (Thursday)

[lots of messages...]

Which I believe reflects the room being created on 2021-08-24, and the earliest event visible when I connected to the server having occurred on 2023-11-02.

I then use ement-room-retro and both of those dates remain in place, and underneath them are inserted 'new' events from the history. When I scroll down through these new events the next date header I reach is:

2023-10-18 (Wednesday)

I.e. the preceding 2023-11-02 (Thursday) is now out of sequence.