mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-12-03 12:49:30 +00:00
62f1dfdefa
* Stop messages flickering through the file panel as they are sent A filtered timeline set is handed the room's pending events unless it is told otherwise, and those are the whole room's pending events rather than the ones the filter would have kept. So every message typed into the room appeared in the file panel for as long as it took the remote echo to arrive, at which point the filter finally threw it out again. The file panel now asks for its timeline set without them. Nothing is lost by that: a file sent from the panel still appears the moment it is sent, because the panel adds live events itself and checks the message type while doing so, which the pending list never did. Tests: the file panel asks for a timeline set which does not carry the room's pending events. * Filter the pending events a filtered timeline set shows Suppressing the file panel's pending events wholesale was the wrong lever: it is an all-or-nothing switch on the room's detached pending list, so it also hid files the user had just sent, and the e2e caught the panel staying empty. Filter them instead. A timeline set already carries the filter it was built with, so the pending events it hands the panel can be held to the same test as the events the server returns. Files being sent still appear immediately; the text messages that used to flicker through never qualify. Panels with no filter, which is every other caller, are untouched. --------- Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>