mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-11-09 15:33:31 +00:00
try catch on use launch window system state
This commit is contained in:
1 parent
6f6fe8c2ba
commit
1758896c91
1 file changed
+7
-3
@@ -96,9 +96,13 @@ export function useLaunchWindowSystemState(
|
||||
}, []);
|
||||
|
||||
const chooseRecordingsDirectory = useCallback(async () => {
|
||||
const result = await window.electronAPI.chooseRecordingsDirectory();
|
||||
if (result.canceled) return;
|
||||
if (result.success && result.path) setRecordingsDirectory(result.path);
|
||||
try {
|
||||
const result = await window.electronAPI.chooseRecordingsDirectory();
|
||||
if (result.canceled) return;
|
||||
if (result.success && result.path) setRecordingsDirectory(result.path);
|
||||
} catch (error) {
|
||||
console.error("Failed to choose recordings directory:", error);
|
||||
}
|
||||
}, []);
|
||||
|
||||
const toggleHudCaptureProtection = useCallback(async () => {
|
||||
|
||||
Reference in new issue
Block a user