Show expiration timer for incoming messages even if unread

This commit is contained in:
Scott Nonnenberg 2022-04-14 11:06:37 -07:00 committed by GitHub
parent c1682a98cc
commit f572abf57d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View file

@ -599,14 +599,11 @@ export class Message extends React.PureComponent<Props, State> {
* because it can reduce layout jumpiness.
*/
private guessMetadataWidth(): number {
const { direction, expirationLength, expirationTimestamp, status } =
this.props;
const { direction, expirationLength, status } = this.props;
let result = GUESS_METADATA_WIDTH_TIMESTAMP_SIZE;
const hasExpireTimer = Boolean(
expirationLength && (expirationTimestamp || direction === 'outgoing')
);
const hasExpireTimer = Boolean(expirationLength);
if (hasExpireTimer) {
result += GUESS_METADATA_WIDTH_EXPIRE_TIMER_SIZE;
}