Compare commits

...
Author SHA1 Message Date
FredApps aa18c9c2e6 Merge branch 'main' into sonar/s9383-tauri-libs 2026-11-10 21:07:50 +01:00
FredApps 09a7b53b03 Merge branch 'main' into sonar/s9383-tauri-libs 2026-11-10 18:54:05 +01:00
FredApps 207f872326 Merge branch 'main' into sonar/s9383-tauri-libs 2026-11-10 18:36:16 +01:00
FredApps cbead67b5a Merge branch 'main' into sonar/s9383-tauri-libs 2026-11-10 18:23:59 +01:00
FredApps c06aaef8f9 tauri-events, tauri-api, tauri-utils: mark fire-and-forget promises with void
Resolves SonarCloud typescript:S9383 in the Tauri frontend libraries.
2026-11-10 12:07:41 +01:00
19 changed files with 53 additions and 53 deletions
@@ -22,15 +22,15 @@ export const useCanvasBgRemovedEvent = (asyncCallback: (event: CanvasBgRemovedEv
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -21,7 +21,7 @@ export function useSoraLoginListener(
unlisten = stop;
};
setupListener();
void setupListener();
return () => {
if (unlisten) unlisten();
@@ -23,15 +23,15 @@ export const useCreditsBalanceChangedEvent = (
);
if (isUnmounted) {
unlisten.then((f) => f()); // Unsubscribe if unmounted early.
void unlisten.then((f) => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then((f) => f());
void unlisten.then((f) => f());
};
}, []);
};
@@ -27,15 +27,15 @@ export const useImageEditCompleteEvent = (asyncCallback: (event: ImageEditComple
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -24,15 +24,15 @@ export const useMediaFileDeletedEvent = (
);
if (isUnmounted) {
unlisten.then((f) => f()); // Unsubscribe if unmounted early.
void unlisten.then((f) => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then((f) => f());
void unlisten.then((f) => f());
};
}, []);
};
@@ -32,15 +32,15 @@ export const useObjectGenerationCompleteEvent = (
);
if (isUnmounted) {
unlisten.then((f) => f()); // Unsubscribe if unmounted early.
void unlisten.then((f) => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then((f) => f());
void unlisten.then((f) => f());
};
}, []);
};
@@ -19,15 +19,15 @@ export const useRefreshAccountStateEvent = (asyncCallback: (event: RefreshAccoun
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -20,15 +20,15 @@ export const useShowProviderBillingModalEvent = (asyncCallback: (event: ShowProv
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -20,15 +20,15 @@ export const useShowProviderLoginModalEvent = (asyncCallback: (event: ShowProvid
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -23,15 +23,15 @@ export const useSubscriptionPlanChangedEvent = (
);
if (isUnmounted) {
unlisten.then((f) => f()); // Unsubscribe if unmounted early.
void unlisten.then((f) => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then((f) => f());
void unlisten.then((f) => f());
};
}, []);
};
@@ -27,15 +27,15 @@ export const useTextToImageGenerationCompleteEvent = (asyncCallback: (event: Tex
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -27,15 +27,15 @@ export const useVideoGenerationCompleteEvent = (asyncCallback: (event: VideoGene
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -25,15 +25,15 @@ export const useGenerationCompleteEvent = () => {
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -26,15 +26,15 @@ export const useGenerationEnqueueFailureEvent = () => {
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -25,15 +25,15 @@ export const useGenerationEnqueueSuccessEvent = () => {
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -26,15 +26,15 @@ export const useGenerationFailedEvent = () => {
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -28,15 +28,15 @@ export const useFlashFileDownloadErrorEvent = (asyncCallback: (event: FlashFileD
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -19,15 +19,15 @@ export const useFlashUserInputErrorEvent = (asyncCallback: (event: FlashUserInpu
});
if (isUnmounted) {
unlisten.then(f => f()); // Unsubscribe if unmounted early.
void unlisten.then(f => f()); // Unsubscribe if unmounted early.
}
};
setup();
void setup();
return () => {
isUnmounted = true;
unlisten.then(f => f());
void unlisten.then(f => f());
};
}, []);
@@ -16,7 +16,7 @@ export function useTauriWindowControls() {
let unlistenUnmax: (() => void) | undefined;
let unlistenResize: (() => void) | undefined;
(async () => {
void (async () => {
try {
const win = await getCurrentWindowSafe();
setIsMaximized(await win.isMaximized());