Skip to content

Improve mark as read logic#6213

Draft
AndyScherzinger wants to merge 1 commit into
masterfrom
fix/6059/markAsRead
Draft

Improve mark as read logic#6213
AndyScherzinger wants to merge 1 commit into
masterfrom
fix/6059/markAsRead

Conversation

@AndyScherzinger
Copy link
Copy Markdown
Member

@AndyScherzinger AndyScherzinger commented May 17, 2026

Resolves: #6059

According to our friend Claude:

The mark-as-read effect had two independent bugs:

  • If the chat opened with the scroll position already at the bottom (e.g. only one unread message), or a new message arrived while the user was already at the bottom, the effect never re-ran since it only triggered on a change of the "at newest" state — leaving messages unmarked as read.
  • If the first item in the list was a non-message entry (such as a date separator), the index-based lookup silently bailed out without advancing the read position at all.

The fix makes the effect re-evaluate whenever the message list changes, and replaces the index-based item lookup with a search that skips non-message entries and reliably resolves the newest actual message.

🚧 TODO

  • test & review for a while

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

Resolves: #6059

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger added this to the 24.0.0 milestone May 17, 2026
@AndyScherzinger AndyScherzinger requested a review from mahibi May 17, 2026 13:34
@AndyScherzinger AndyScherzinger added bug Something isn't working 2. developing Work in progress labels May 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/25992339992/artifacts/7042914076
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After leaving a conversation (while it was scolled to the bottom), it isn't always marked as read in the conversation list

1 participant