fix text color of expire timer when image only message

This commit is contained in:
Audric Ackermann 2020-12-07 15:03:55 +11:00
parent 0714b73fe7
commit a58a1a4fba
3 changed files with 8 additions and 5 deletions

View file

@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { getIncrement, getTimerBucketIcon } from '../../util/timer';
import { getTimerBucketIcon } from '../../util/timer';
import { useInterval } from '../../hooks/useInterval';
import styled, { DefaultTheme } from 'styled-components';
import { OpacityMetadataComponent } from './message/MessageMetadata';
@ -23,6 +23,7 @@ const ExpireTimerCount = styled(props => (
letter-spacing: 0.3px;
text-transform: uppercase;
user-select: none;
color: ${props => props.color};
`;
const ExpireTimerBucket = styled(props => (
@ -34,6 +35,7 @@ const ExpireTimerBucket = styled(props => (
letter-spacing: 0.3px;
text-transform: uppercase;
user-select: none;
color: ${props => props.color};
`;
export const ExpireTimer = (props: Props) => {
@ -65,9 +67,7 @@ export const ExpireTimer = (props: Props) => {
if (timeLeft <= 60) {
return (
<ExpireTimerCount expireTimerColor={expireTimerColor}>
{timeLeft}
</ExpireTimerCount>
<ExpireTimerCount color={expireTimerColor}>{timeLeft}</ExpireTimerCount>
);
}
const bucket = getTimerBucketIcon(expirationTimestamp, expirationLength);

View file

@ -94,6 +94,7 @@ export class SessionMessagesList extends React.Component<Props, State> {
this.setState(
{
showScrollButton: false,
animateQuotedMessageId: undefined,
},
this.scrollToUnread
);

View file

@ -45,7 +45,9 @@ export const SessionIconButton = (props: SProps) => {
iconRotation={iconRotation}
theme={theme}
/>
<SessionNotificationCount count={notificationCount} />
{Boolean(notificationCount) && (
<SessionNotificationCount count={notificationCount} />
)}
</div>
);
};