fix: remove unnecessary useEffect

This commit is contained in:
Hachi-R
2025-04-26 13:01:09 -03:00
parent 538878dba9
commit e1fb3bac76
2 changed files with 1 additions and 7 deletions

View File

@@ -139,12 +139,6 @@ export function DownloadSettingsModal({
userPreferences?.torBoxApiToken,
]);
useEffect(() => {
if (userPreferences?.extractFilesByDefault === undefined) {
window.electron.updateUserPreferences({ extractFilesByDefault: true });
}
}, [userPreferences?.extractFilesByDefault]);
const handleChooseDownloadsPath = async () => {
const { filePaths } = await window.electron.showOpenDialog({
defaultPath: selectedPath,

View File

@@ -88,7 +88,7 @@ export interface UserPreferences {
achievementNotificationsEnabled?: boolean;
friendRequestNotificationsEnabled?: boolean;
showDownloadSpeedInMegabytes?: boolean;
extractFilesByDefault?: boolean;
extractFilesByDefault?: boolean | undefined;
}
export interface ScreenState {