Skip to content

fix(chat): stabilize unread marker positioning and unread popup behavior#6280

Open
mahibi wants to merge 1 commit into
masterfrom
bugfix/noid/fixUnreadMessagesMarker
Open

fix(chat): stabilize unread marker positioning and unread popup behavior#6280
mahibi wants to merge 1 commit into
masterfrom
bugfix/noid/fixUnreadMessagesMarker

Conversation

@mahibi
Copy link
Copy Markdown
Collaborator

@mahibi mahibi commented Jun 2, 2026

Opening chats with unread messages had inconsistent behavior in the Compose chat list:

  • the unread marker was sometimes not scrolled into view (or not centered),
  • the unread popup could appear during initial entry when the marker should be the primary indicator,
  • popup counting could reset incorrectly and show "1 new message" repeatedly,
  • near-bottom auto-scroll to newest messages regressed in some cases.

This change updates ChatView state/effect handling to:

  • scroll to and center the unread marker once it is present in the loaded item list,
  • suppress the unread popup during marker-based initial entry,
  • keep popup counting stable for real incoming messages after entry,
  • restore auto-scroll to newest messages when the user is already near the bottom.

🏁 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?)

Opening chats with unread messages had inconsistent behavior in the Compose chat list:
- the unread marker was sometimes not scrolled into view (or not centered),
- the unread popup could appear during initial entry when the marker should be the primary indicator,
- popup counting could reset incorrectly and show "1 new message" repeatedly,
- near-bottom auto-scroll to newest messages regressed in some cases.

This change updates ChatView state/effect handling to:
- scroll to and center the unread marker once it is present in the loaded item list,
- suppress the unread popup during marker-based initial entry,
- keep popup counting stable for real incoming messages after entry,
- restore auto-scroll to newest messages when the user is already near the bottom.

AI-assistant: GitHub Copilot 1.9.1-251 (GPT-5.3-Codex)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi added this to the 24.1.0 milestone Jun 2, 2026
@mahibi mahibi requested a review from rapterjet2004 June 2, 2026 13:48
@mahibi mahibi self-assigned this Jun 2, 2026
@mahibi mahibi added the 3. to review Waiting for reviews label Jun 2, 2026
@mahibi
Copy link
Copy Markdown
Collaborator Author

mahibi commented Jun 2, 2026

/backport to stable-24.0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

APK file: https://github.com/nextcloud/talk-android/actions/runs/26824102786/artifacts/7360252387
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant