MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / handleAppInstallDrop

Function handleAppInstallDrop

packages/client/src/app/AppShell.tsx:2719–2733  ·  view source on GitHub ↗
(event: React.DragEvent<HTMLElement>)

Source from the content-addressed store, hash-verified

2717 }
2718
2719 function handleAppInstallDrop(event: React.DragEvent<HTMLElement>) {
2720 if (!dragEventHasFiles(event.dataTransfer)) {
2721 return;
2722 }
2723 event.preventDefault();
2724 event.stopPropagation();
2725 appInstallDragDepthRef.current = 0;
2726 const files = Array.from(event.dataTransfer.files);
2727 if (files.length !== 1) {
2728 setAppInstallState(null);
2729 setLocalError("Drop one `.ipa` or `.apk` file at a time.");
2730 return;
2731 }
2732 void installAppFile(files[0], selectedSimulator);
2733 }
2734
2735 async function installAppFile(
2736 file: File,

Callers

nothing calls this directly

Calls 3

dragEventHasFilesFunction · 0.85
installAppFileFunction · 0.85
fromMethod · 0.80

Tested by

no test coverage detected