Restore indicator when conversation is manually marked unread

This commit is contained in:
Scott Nonnenberg 2023-05-24 14:33:11 -07:00 committed by GitHub
parent c0663ed57c
commit 2dc24540ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -4501,7 +4501,8 @@ button.module-image__border-overlay:focus {
@include dark-theme {
background-color: $color-ultramarine-dawn;
}
&--unread-messages {
&--unread-messages,
&--marked-unread {
@include font-caption-bold;
text-align: center;
word-break: normal;

View file

@ -182,7 +182,9 @@ export const BaseConversationListItem: FunctionComponent<PropsType> =
variant={UnreadIndicatorVariant.UNREAD_MESSAGES}
count={unreadCount}
/>
) : null}
) : (
<UnreadIndicator variant={UnreadIndicatorVariant.MARKED_UNREAD} />
)}
</div>
);
})();
@ -337,11 +339,15 @@ function Timestamp({
}
enum UnreadIndicatorVariant {
MARKED_UNREAD = 'marked-unread',
UNREAD_MESSAGES = 'unread-messages',
UNREAD_MENTIONS = 'unread-mentions',
}
type UnreadIndicatorPropsType =
| {
variant: UnreadIndicatorVariant.MARKED_UNREAD;
}
| {
variant: UnreadIndicatorVariant.UNREAD_MESSAGES;
count: number;
@ -352,6 +358,9 @@ function UnreadIndicator(props: UnreadIndicatorPropsType) {
let content: React.ReactNode;
switch (props.variant) {
case UnreadIndicatorVariant.MARKED_UNREAD:
content = null;
break;
case UnreadIndicatorVariant.UNREAD_MESSAGES:
content = props.count > 0 && props.count;
break;