Feature/dm cache rework#2158
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2646df5130
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| messageKey = messageKey, | ||
| ) | ||
| }.onSuccess { | ||
| database.messageDao().deleteMessage(messageKey) |
There was a problem hiding this comment.
Update denormalized DM room after deleting messages
When the deleted remote message is the current DbDirectMessageTimeline.content.lastMessage, this now removes only the DbMessageItem; the room list and room-info flows read the denormalized DbDirectMessageTimeline.content, not the message relation anymore, so they continue to display the deleted message until some later room-list refresh rewrites the timeline. Please also refresh or patch the affected timeline row when deleting a message.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d82c9385d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| inMemoryBadgeCount.value = loader.loadBadgeCount() | ||
| }, | ||
| cacheSource = { | ||
| inMemoryBadgeCount.filterNotNull() |
There was a problem hiding this comment.
Keep the DM badge in sync after marking a room read
When fetchNew() marks a conversation read, it clears the room's unread count in the database but the badge stream now only emits inMemoryBadgeCount, so observers keep showing the old total until someone explicitly refreshes the badge from the server. This regresses the inspected DM flows: Bluesky's badge used to be derived from the room timeline, and XQT's fetch-new path used to refresh the badge after marking read.
Useful? React with 👍 / 👎.
No description provided.