Skip to content

Message list doesn't update when messages marked unread #5536

@gnprice

Description

@gnprice

If you're looking at a message list in the mobile app and then mark some of those messages as unread (from another client), they don't regain their unread-markers. The "N unread messages" banner at the top does update, but the individual messages still appear to be read.

This is a gap in the implementation of #5361. What we merged for that issue updates the state in Redux, which is enough to update the bulk of the UI in the app… but there's a major exception, namely the message list contained in a webview, as explained in the MessageList comments added in 8aac31c / #5524.

For any state that affects what we show inside the webview, when that state changes, we need to have our own code to detect the change, communicate it to inside the webview, and apply it there. We have that for when a message becomes read, but not for the reverse.

The existing logic was correct in the past, when it was impossible for a read message to become unread. So from another angle, the root cause here is that this is one of the many places across the Zulip project where that longstanding invariant had been embedded as an assumption, and so needed revision when we started breaking that former invariant.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions