Disappearing message cleanups

This commit is contained in:
Evan Hahn 2021-06-16 17:20:17 -05:00 committed by GitHub
parent dfa6fb5d61
commit 03a187097f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 149 additions and 268 deletions

View file

@ -152,7 +152,6 @@ export type PropsData = {
isViewOnce: boolean;
};
previews: Array<LinkPreviewType>;
isExpired?: boolean;
isTapToView?: boolean;
isTapToViewExpired?: boolean;
@ -497,7 +496,7 @@ export class Message extends React.Component<Props, State> {
public checkExpired(): void {
const now = Date.now();
const { isExpired, expirationTimestamp, expirationLength } = this.props;
const { expirationTimestamp, expirationLength } = this.props;
if (!expirationTimestamp || !expirationLength) {
return;
@ -506,7 +505,7 @@ export class Message extends React.Component<Props, State> {
return;
}
if (isExpired || now >= expirationTimestamp) {
if (now >= expirationTimestamp) {
this.setState({
expiring: true,
});