Update file handling logic in App.tsx

This commit is contained in:
2026-01-31 00:42:33 +01:00
parent d69bb68cf8
commit 526cfa4b4e

View File

@@ -84,9 +84,7 @@ export default function App() {
getCurrentWindow() getCurrentWindow()
.onDragDropEvent(async (event) => { .onDragDropEvent(async (event) => {
if (event.payload.type !== "drop") return; if (event.payload.type !== "drop") return;
const [path] = event.payload.paths ?? []; await handleFilePaths(event.payload.paths ?? []);
if (!path || !path.toLowerCase().endsWith(".txt")) return;
await createTextFromFile(path);
}) })
.then((cleanup) => { .then((cleanup) => {
unlisten = cleanup; unlisten = cleanup;