Restore indicator when conversation is manually marked unread
This commit is contained in:
parent
c0663ed57c
commit
2dc24540ac
2 changed files with 12 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue