This commit is contained in:
Abhinav 2023-09-09 14:33:46 +05:30
parent d99bbfae70
commit 5bf1a39b0c

View file

@ -554,6 +554,15 @@ function PhotoViewer(props: Iprops) {
fullScreenApi.enter(); fullScreenApi.enter();
} }
}; };
const triggerManualConvert = () => {
props.getConvertedVideo(
photoSwipe,
photoSwipe.getCurrentIndex(),
photoSwipe.currItem as EnteFile
);
};
const scheduleUpdate = () => (needUpdate.current = true); const scheduleUpdate = () => (needUpdate.current = true);
const { id } = props; const { id } = props;
let { className } = props; let { className } = props;
@ -587,13 +596,7 @@ function PhotoViewer(props: Iprops) {
)} )}
{showConvertBtn && ( {showConvertBtn && (
<ConvertBtn <ConvertBtn
onClick={() => { onClick={triggerManualConvert}
props.getConvertedVideo(
photoSwipe,
photoSwipe.getCurrentIndex(),
photoSwipe.currItem as EnteFile
);
}}
disabled={!isSourceLoaded}> disabled={!isSourceLoaded}>
{t('CONVERT')} {t('CONVERT')}
</ConvertBtn> </ConvertBtn>