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() {
|
async componentDidMount() {
|
||||||
const { file } = this.props;
|
const { file, isReply } = this.props;
|
||||||
const cachedAudioResult = await searchMediaFileAsync({
|
const cachedAudioResult = await searchMediaFileAsync({
|
||||||
type: 'audio',
|
type: 'audio',
|
||||||
mimeType: file.audio_type,
|
mimeType: file.audio_type,
|
||||||
|
@ -154,6 +154,7 @@ class MessageAudio extends React.Component<IMessageAudioProps, IMessageAudioStat
|
||||||
await this.sound.loadAsync({ uri: cachedAudioResult.file.uri });
|
await this.sound.loadAsync({ uri: cachedAudioResult.file.uri });
|
||||||
return this.setState({ loading: false });
|
return this.setState({ loading: false });
|
||||||
}
|
}
|
||||||
|
if (isReply) return;
|
||||||
await this.handleAutoDownload();
|
await this.handleAutoDownload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,7 @@ const ImageContainer = React.memo(
|
||||||
}));
|
}));
|
||||||
return setCached(true);
|
return setCached(true);
|
||||||
}
|
}
|
||||||
|
if (isReply) return;
|
||||||
if (isDownloadActive('image', imgUrlToCache)) {
|
if (isDownloadActive('image', imgUrlToCache)) {
|
||||||
return setLoading(true);
|
return setLoading(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,7 @@ const Video = React.memo(
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (isReply) return;
|
||||||
if (downloadActive) return setLoading(true);
|
if (downloadActive) return setLoading(true);
|
||||||
await handleAutoDownload();
|
await handleAutoDownload();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue