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) {
|
||||
const previewFile = hasProcessed ? undefined : currentEntry?.file;
|
||||
const previewSrc = hasProcessed ? processedUrl : undefined;
|
||||
const previewSrc = hasProcessed ? (processedUrl ?? originalBlobUrl) : undefined;
|
||||
const previewSize = hasProcessed
|
||||
? (currentEntry?.processedSize ?? 0)
|
||||
: (currentEntry?.file?.size ?? 0);
|
||||
if (previewFile || previewSrc) {
|
||||
return (
|
||||
<Suspense fallback={<div className="text-sm text-muted-foreground">Loading...</div>}>
|
||||
<NonNativePreview
|
||||
file={previewFile}
|
||||
src={previewSrc}
|
||||
filename={currentFileName}
|
||||
fileSize={previewSize}
|
||||
modality="video"
|
||||
/>
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Suspense fallback={<div className="text-sm text-muted-foreground">Loading...</div>}>
|
||||
<NonNativePreview
|
||||
file={previewFile}
|
||||
src={previewSrc}
|
||||
filename={currentFileName}
|
||||
fileSize={previewSize}
|
||||
modality="video"
|
||||
/>
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Suspense fallback={<div className="text-sm text-muted-foreground">Loading...</div>}>
|
||||
|
||||
Reference in New Issue
Block a user