mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
fix text color of expire timer when image only message
This commit is contained in:
parent
0714b73fe7
commit
a58a1a4fba
|
@ -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);
|
||||
|
|
|
@ -94,6 +94,7 @@ export class SessionMessagesList extends React.Component<Props, State> {
|
|||
this.setState(
|
||||
{
|
||||
showScrollButton: false,
|
||||
animateQuotedMessageId: undefined,
|
||||
},
|
||||
this.scrollToUnread
|
||||
);
|
||||
|
|
|
@ -45,7 +45,9 @@ export const SessionIconButton = (props: SProps) => {
|
|||
iconRotation={iconRotation}
|
||||
theme={theme}
|
||||
/>
|
||||
<SessionNotificationCount count={notificationCount} />
|
||||
{Boolean(notificationCount) && (
|
||||
<SessionNotificationCount count={notificationCount} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue