refactor
This commit is contained in:
parent
d99bbfae70
commit
5bf1a39b0c
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue