fix(chat): keep sticky date header below pinned/overflow items and sync with visible messages#6284
Merged
Merged
Conversation
Collaborator
Author
|
/backport to stable-24.0 |
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/26851207747/artifacts/7371211384 |
… 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>
9c1d784 to
e1462a2
Compare
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/26852041991/artifacts/7371531065 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When pinned messages, upcoming events, or the out-of-office banner were
visible at the top of the chat, two problems occurred:
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
/backport to stable-xx.x