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, userPreferences?.torBoxApiToken,
]); ]);
useEffect(() => {
if (userPreferences?.extractFilesByDefault === undefined) {
window.electron.updateUserPreferences({ extractFilesByDefault: true });
}
}, [userPreferences?.extractFilesByDefault]);
const handleChooseDownloadsPath = async () => { const handleChooseDownloadsPath = async () => {
const { filePaths } = await window.electron.showOpenDialog({ const { filePaths } = await window.electron.showOpenDialog({
defaultPath: selectedPath, defaultPath: selectedPath,

View File

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