Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Treat rooms with pending events as read #3175

Closed
wants to merge 2 commits into from

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Jul 3, 2019

This changes the room unread logic to mark any room with pending events as read,
under the assumption that you are active in the room. This also ensures that
local echoes of pending events do not cause rooms to temporarily appear unread.

Fixes element-hq/element-web#9952

jryans added 2 commits July 3, 2019 14:58
This changes the room unread logic to mark any room with pending events as read,
under the assumption that you are active in the room. This also ensures that
local echoes of pending events do not cause rooms to temporarily appear unread.

Fixes element-hq/element-web#9952
@jryans jryans requested a review from a team July 3, 2019 14:34
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, wondering if this won't have the following unwanted consequence:

if you type a few messages into a room, get rate limited, move to the next unread room, and now the person in the first room sends a message.

Am I right in thinking that (depending on notification settings), you wouldn't find out until they're all sent and the roomlist happens to rerender for some random reason?

Alternatively, we could keep track of the room you're looking at rather?

@jryans
Copy link
Collaborator Author

jryans commented Jul 3, 2019

if you type a few messages into a room, get rate limited, move to the next unread room, and now the person in the first room sends a message.

Am I right in thinking that (depending on notification settings), you wouldn't find out until they're all sent and the roomlist happens to rerender for some random reason?

Yes, that's correct, with the current PR, your pending events would have to sent and go away before the room could become unread again. If someone sends a message in the mean time, the room would only go unread after your pending events are sent and the room list re-renders.

Alternatively, we could keep track of the room you're looking at rather?

We could, but then I think the issue being fixed here will still exist: if you react and also run away to another room, we'd skip this new block (since the room is no longer focused).

Maybe a more robust approach would involve checking the read receipt against the pending events... Okay, I'll try again with a different technique. 😁

@jryans jryans closed this Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sending a reaction bolds the room
2 participants