mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: always show NonNativePreview for non-native formats, even after processing
This commit is contained in:
@@ -674,23 +674,21 @@ export function ToolPage() {
|
|||||||
|
|
||||||
if (!isNativeVideo && currentExt) {
|
if (!isNativeVideo && currentExt) {
|
||||||
const previewFile = hasProcessed ? undefined : currentEntry?.file;
|
const previewFile = hasProcessed ? undefined : currentEntry?.file;
|
||||||
const previewSrc = hasProcessed ? processedUrl : undefined;
|
const previewSrc = hasProcessed ? (processedUrl ?? originalBlobUrl) : undefined;
|
||||||
const previewSize = hasProcessed
|
const previewSize = hasProcessed
|
||||||
? (currentEntry?.processedSize ?? 0)
|
? (currentEntry?.processedSize ?? 0)
|
||||||
: (currentEntry?.file?.size ?? 0);
|
: (currentEntry?.file?.size ?? 0);
|
||||||
if (previewFile || previewSrc) {
|
return (
|
||||||
return (
|
<Suspense fallback={<div className="text-sm text-muted-foreground">Loading...</div>}>
|
||||||
<Suspense fallback={<div className="text-sm text-muted-foreground">Loading...</div>}>
|
<NonNativePreview
|
||||||
<NonNativePreview
|
file={previewFile}
|
||||||
file={previewFile}
|
src={previewSrc}
|
||||||
src={previewSrc}
|
filename={currentFileName}
|
||||||
filename={currentFileName}
|
fileSize={previewSize}
|
||||||
fileSize={previewSize}
|
modality="video"
|
||||||
modality="video"
|
/>
|
||||||
/>
|
</Suspense>
|
||||||
</Suspense>
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={<div className="text-sm text-muted-foreground">Loading...</div>}>
|
<Suspense fallback={<div className="text-sm text-muted-foreground">Loading...</div>}>
|
||||||
|
|||||||
Reference in New Issue
Block a user