Skip to content

fix(chat): keep sticky date header below pinned/overflow items and sync with visible messages#6284

Merged
mahibi merged 1 commit into
masterfrom
bugfix/noid/stickyHeaderUnderOverflowContainer
Jun 3, 2026
Merged

fix(chat): keep sticky date header below pinned/overflow items and sync with visible messages#6284
mahibi merged 1 commit into
masterfrom
bugfix/noid/stickyHeaderUnderOverflowContainer

Conversation

@mahibi
Copy link
Copy Markdown
Collaborator

@mahibi mahibi commented Jun 2, 2026

When pinned messages, upcoming events, or the out-of-office banner were
visible at the top of the chat, two problems occurred:

  1. The sticky date header was drawn behind the overlay instead of below it.
  2. The date shown was wrong: the LazyColumn (reverseLayout=true) counted items hidden behind the overlay as "visible", so lastOrNull() picked an older item that the user couldn't see.

Track the overlay container height via ViewTreeObserver and pass it to
ChatView as stickyHeaderTopOffset. Use it to (a) shift the header's
visual position below the overlay, and (b) filter visibleItemsInfo to
only items whose bottom edge clears the overlay before selecting the
topmost one for the date text.

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)

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

@mahibi mahibi added this to the 24.1.0 milestone Jun 2, 2026
@mahibi mahibi requested a review from rapterjet2004 June 2, 2026 22:14
@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/26851207747/artifacts/7371211384
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)

… sync with visible messages

  When pinned messages, upcoming events, or the out-of-office banner were
  visible at the top of the chat, two problems occurred:

  1. The sticky date header was drawn behind the overlay instead of below it.
  2. The date shown was wrong: the LazyColumn (reverseLayout=true) counted
     items hidden behind the overlay as "visible", so lastOrNull() picked
     an older item that the user couldn't see.

  Track the overlay container height via ViewTreeObserver and pass it to
  ChatView as stickyHeaderTopOffset. Use it to (a) shift the header's
  visual position below the overlay, and (b) filter visibleItemsInfo to
  only items whose bottom edge clears the overlay before selecting the
  topmost one for the date text.

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi force-pushed the bugfix/noid/stickyHeaderUnderOverflowContainer branch from 9c1d784 to e1462a2 Compare June 2, 2026 22:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

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

@mahibi mahibi merged commit 61a91e6 into master Jun 3, 2026
15 of 18 checks passed
@mahibi mahibi deleted the bugfix/noid/stickyHeaderUnderOverflowContainer branch June 3, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant