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()
.onDragDropEvent(async (event) => {
if (event.payload.type !== "drop") return;
const [path] = event.payload.paths ?? [];
if (!path || !path.toLowerCase().endsWith(".txt")) return;
await createTextFromFile(path);
await handleFilePaths(event.payload.paths ?? []);
})
.then((cleanup) => {
unlisten = cleanup;