fix: allow 99 unread count before going to 99+

pull/2572/head
Audric Ackermann 3 years ago
parent 0ba0abfcdc
commit 0b9f1a494a

@ -27,19 +27,19 @@ const StyledCountContainer = styled.div<{ shouldRender: boolean }>`
const StyledCount = styled.div` const StyledCount = styled.div`
position: relative; position: relative;
font-size: 0.6em; font-size: 0.6rem;
`; `;
export const SessionNotificationCount = (props: Props) => { export const SessionNotificationCount = (props: Props) => {
const { count } = props; const { count } = props;
const overflow = Boolean(count && count > 9); const overflow = Boolean(count && count > 99);
const shouldRender = Boolean(count && count > 0); const shouldRender = Boolean(count && count > 0);
if (overflow) { if (overflow) {
return ( return (
<StyledCountContainer shouldRender={shouldRender}> <StyledCountContainer shouldRender={shouldRender}>
<StyledCount> <StyledCount>
{9} {99}
<span>+</span> <span>+</span>
</StyledCount> </StyledCount>
</StyledCountContainer> </StyledCountContainer>

@ -117,7 +117,6 @@ const Section = (props: { type: SectionType }) => {
iconSize="medium" iconSize="medium"
dataTestId="settings-section" dataTestId="settings-section"
iconType={'gear'} iconType={'gear'}
notificationCount={unreadToShow}
onClick={handleClick} onClick={handleClick}
isSelected={isSelected} isSelected={isSelected}
/> />
@ -138,7 +137,6 @@ const Section = (props: { type: SectionType }) => {
iconSize="medium" iconSize="medium"
iconType={isDarkMode ? 'moon' : 'sun'} iconType={isDarkMode ? 'moon' : 'sun'}
dataTestId="theme-section" dataTestId="theme-section"
notificationCount={unreadToShow}
onClick={handleClick} onClick={handleClick}
isSelected={isSelected} isSelected={isSelected}
/> />

@ -364,7 +364,7 @@ export const _getLeftPaneLists = (
} }
if ( if (
unreadCount < 9 && unreadCount < 100 &&
conversation.unreadCount && conversation.unreadCount &&
conversation.unreadCount > 0 && conversation.unreadCount > 0 &&
conversation.currentNotificationSetting !== 'disabled' conversation.currentNotificationSetting !== 'disabled'

Loading…
Cancel
Save