Commit 5cef529
committed
Address PR review: visibility key, null-label guard, test strictness
- Messages.kt: switch the pill's separator-visibility check to compare
LazyListItemInfo.key against the separator item's id, instead of comparing
the message-list index against the LazyList index. The two diverge when
non-message items (footerContent, the load-more indicator) precede
itemsIndexed in the column, which would mis-judge pill visibility.
- MessageListController.disableUnreadLabelButton: early-return when there is
no active unread label. The previous code emitted false on
showUnreadButtonState even on a no-op call (e.g. scrollToFirstUnreadMessage
with a null unreadLabelState, or the XML SDK's HideUnreadLabel event with
no active label), permanently latching the suppression for the controller's
lifetime and hiding any future unread pill.
- MessageListControllerTests: strengthen the post-read assertion to fail when
unreadLabelState becomes null. The previous safe-call chain silently passed
when the chain returned null, masking the regression the test is meant to
guard.1 parent 51386f9 commit 5cef529
3 files changed
Lines changed: 10 additions & 7 deletions
File tree
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list
- stream-chat-android-ui-common/src
- main/kotlin/io/getstream/chat/android/ui/common/feature/messages/list
- test/kotlin/io/getstream/chat/android/ui/common/feature/messages/list
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
| 389 | + | |
| 390 | + | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | | - | |
395 | | - | |
| 394 | + | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| 639 | + | |
639 | 640 | | |
640 | | - | |
| 641 | + | |
641 | 642 | | |
642 | 643 | | |
643 | 644 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1047 | 1047 | | |
1048 | 1048 | | |
1049 | 1049 | | |
1050 | | - | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1051 | 1053 | | |
1052 | 1054 | | |
1053 | 1055 | | |
| |||
0 commit comments