You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inbox: Fix bug where channel unread badge text color was slightly wrong
UnreadCountBadge has a needlessly loose API for specifying a
background color, with three options:
1. Channel-colorized: callers are supposed to pass a
ChannelColorSwatch and the implementation picks
`unreadCountBadgeBackground` off of that.
2. Any other Color. (ChannelColorSwatch is a Color.)
3. A default color, chosen by the implementation, if `null` is
passed.
We don't actually have any use for option 2, at least currently, so
we'll remove it next.
The buggy caller here was using option 2 when it should have used
option 1: it wanted a channel-colored background, but it itself
picked `unreadCountBadgeBackground` off of the swatch instead of
passing the whole swatch to UnreadCountBadge for it to do that. That
would have been fine except that the channel-colorized case has its
own associated *text* color, and that's conditioned on whether the
passed background color is a ChannelColorSwatch.
0 commit comments