avoid auto download from reply
This commit is contained in:
parent
332e51f2db
commit
469d42bdd0
|
@ -143,7 +143,7 @@ class MessageAudio extends React.Component<IMessageAudioProps, IMessageAudioStat
|
|||
};
|
||||
|
||||
async componentDidMount() {
|
||||
const { file } = this.props;
|
||||
const { file, isReply } = this.props;
|
||||
const cachedAudioResult = await searchMediaFileAsync({
|
||||
type: 'audio',
|
||||
mimeType: file.audio_type,
|
||||
|
@ -154,6 +154,7 @@ class MessageAudio extends React.Component<IMessageAudioProps, IMessageAudioStat
|
|||
await this.sound.loadAsync({ uri: cachedAudioResult.file.uri });
|
||||
return this.setState({ loading: false });
|
||||
}
|
||||
if (isReply) return;
|
||||
await this.handleAutoDownload();
|
||||
}
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ const ImageContainer = React.memo(
|
|||
}));
|
||||
return setCached(true);
|
||||
}
|
||||
if (isReply) return;
|
||||
if (isDownloadActive('image', imgUrlToCache)) {
|
||||
return setLoading(true);
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ const Video = React.memo(
|
|||
}
|
||||
return;
|
||||
}
|
||||
if (isReply) return;
|
||||
if (downloadActive) return setLoading(true);
|
||||
await handleAutoDownload();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue