Skip to content

Commit 70b6021

Browse files
author
liuchuancong
committed
fix(*)
1 parent 87d6c31 commit 70b6021

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

lib/plugins/utils.dart

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ class Utils {
259259
onChanged: (bool? value) {
260260
setState(() {
261261
shouldNotAskAgain = value!;
262+
settings.dontAskExit.value = shouldNotAskAgain;
262263
});
263264
},
264265
),
@@ -271,10 +272,7 @@ class Utils {
271272
actions: [
272273
TextButton(
273274
onPressed: () async {
274-
if (shouldNotAskAgain) {
275-
settings.dontAskExit.value = true;
276-
settings.exitChoose.value = 'minimize';
277-
}
275+
settings.exitChoose.value = 'minimize';
278276
Navigator.of(context).pop();
279277
Future.delayed(const Duration(milliseconds: 200), () async {
280278
if (await windowManager.isPreventClose()) {
@@ -287,12 +285,9 @@ class Utils {
287285
ElevatedButton(
288286
style: ElevatedButton.styleFrom(backgroundColor: Colors.redAccent, foregroundColor: Colors.white),
289287
onPressed: () {
290-
if (shouldNotAskAgain) {
291-
settings.dontAskExit.value = true;
292-
settings.exitChoose.value = 'exit';
293-
}
288+
settings.exitChoose.value = 'exit';
294289
Navigator.of(context).pop();
295-
Future.delayed(const Duration(milliseconds: 200), () {
290+
Future.delayed(const Duration(milliseconds: 400), () {
296291
exit(0);
297292
});
298293
},

0 commit comments

Comments
 (0)