This changes the `TimelinePanel` to track live events (that have committed to
the server and been remote echoed) as well as the full list of events (which
includes pending events).
The code paths that advance read receipt and read markers are then changed to
only use the live events so that these cannot advance into pending events.
Fixes https://github.com/vector-im/riot-web/issues/9952
This changes read receipt sending logic to allow it advance further into events
without tiles (such as edits or reactions) that may exist after the last
displayed event.
By allowing the read receipt to advance past such events, this also marks as
read any related notifications. For example, edits trigger notifications by
default since they are `m.room.message` events, and with this change, such edit
notifications can finally be marked read.
Part of https://github.com/vector-im/riot-web/issues/9745
Timeline sets may have a null room, such as with the notification timeline set.
Here we check that case when events are decrypted to avoid throw an error.
Fixes https://github.com/vector-im/riot-web/issues/9798
This fixes an error that crashed that notifications panel because it was trying
to read reactions, even though we currently don't aggregate them there. This
change is more explicit about exactly which views should try to show reactions.
Fixes https://github.com/vector-im/riot-web/issues/9713
instead of setting a min-height on the whole timeline,
track how much height we need to add to prevent shrinking
and set paddingBottom on the container element of the timeline.
Splits UserActivity into a tristate of 'active' (last < 1s), 'passive' (lasts a
couple of mins) and neither. Read receipts are sent when 'active', read markers
are sent while 'passive'.
Also fixed a document / window mix-up on the 'blur' handler.
Also adds a unit test for UserActivity because it's quite complex now
(and changes UserActivity to make it testable by accessing the singleton
via sharedInstance() rather than exporting it directly).
Fixes https://github.com/vector-im/riot-web/issues/9023
In summary this makes RoomTiles (and RoomAvatars) do more for
themselves in terms of reacting individually to state changes in
the js-sdk.
Instead of force updating the entire room list for avatar changes
and room name changes, do this in the RoomTile and RoomAvatar
instead. This increases the number of listeners listening to the
matrix client, but allows us to properly implement a
shouldComponentUpdate for RoomTile (because the avatar, name and
notification count are now in component state)
As comment hopefully explains. This meant loading the app on an e2e
room would often be very slow as it tried to pull hundreds of events
into the timeline.
This code only kicks in if the user was ignored after an event was sent. The homeserver should prevent other events from coming in.
Signed-off-by: Travis Ralston <travpc@gmail.com>