Don't show a confirm dialog for quitting (#4225)

This commit is contained in:
Jack Amadeo
2025-08-20 11:58:05 -04:00
committed by GitHub
parent 302e9468d8
commit 868316a5a7
4 changed files with 0 additions and 101 deletions
@@ -18,7 +18,6 @@ interface AppSettingsSectionProps {
export default function AppSettingsSection({ scrollToSection }: AppSettingsSectionProps) {
const [menuBarIconEnabled, setMenuBarIconEnabled] = useState(true);
const [dockIconEnabled, setDockIconEnabled] = useState(true);
const [quitConfirmationEnabled, setQuitConfirmationEnabled] = useState(true);
const [wakelockEnabled, setWakelockEnabled] = useState(true);
const [isMacOS, setIsMacOS] = useState(false);
const [isDockSwitchDisabled, setIsDockSwitchDisabled] = useState(false);
@@ -144,10 +143,6 @@ export default function AppSettingsSection({ scrollToSection }: AppSettingsSecti
setMenuBarIconEnabled(enabled);
});
window.electron.getQuitConfirmationState().then((enabled) => {
setQuitConfirmationEnabled(enabled);
});
window.electron.getWakelockState().then((enabled) => {
setWakelockEnabled(enabled);
});
@@ -199,14 +194,6 @@ export default function AppSettingsSection({ scrollToSection }: AppSettingsSecti
}
};
const handleQuitConfirmationToggle = async () => {
const newState = !quitConfirmationEnabled;
const success = await window.electron.setQuitConfirmation(newState);
if (success) {
setQuitConfirmationEnabled(newState);
}
};
const handleWakelockToggle = async () => {
const newState = !wakelockEnabled;
const success = await window.electron.setWakelock(newState);
@@ -295,23 +282,6 @@ export default function AppSettingsSection({ scrollToSection }: AppSettingsSecti
</div>
)}
{/* Quit Confirmation */}
<div className="flex items-center justify-between">
<div>
<h3 className="text-text-default text-xs">Quit confirmation</h3>
<p className="text-xs text-text-muted max-w-md mt-[2px]">
Show confirmation dialog when quitting the app
</p>
</div>
<div className="flex items-center">
<Switch
checked={quitConfirmationEnabled}
onCheckedChange={handleQuitConfirmationToggle}
variant="mono"
/>
</div>
</div>
{/* Prevent Sleep */}
<div className="flex items-center justify-between">
<div>