This commit is contained in:
2024-11-23 22:45:25 +08:00
parent 4c6a5f7565
commit 4b70ec1914
4 changed files with 14 additions and 8 deletions

View File

@ -176,7 +176,7 @@ class InputMethodDialogUIModel extends _$InputMethodDialogUIModel {
resultText =
resultText.replaceFirst(firstChar, firstChar.toUpperCase());
}
_destTextCtrl?.text = "$content\n[en] $resultText";
_destTextCtrl?.text = "$content \n[en] $resultText";
if (state.enableAutoCopy || webMessage) {
Clipboard.setData(ClipboardData(text: _destTextCtrl?.text ?? ""));
}

View File

@ -155,9 +155,15 @@ class SettingsUIModel extends _$SettingsUIModel {
final dir2 = Directory(
"${appGlobalState.applicationSupportDir}/launcher_enhance_data");
if (!context.mounted) return;
await dir1.delete(recursive: true).unwrap(context: context);
if (await dir1.exists()) {
if (!context.mounted) return;
await dir1.delete(recursive: true).unwrap(context: context);
}
if (!context.mounted) return;
await dir2.delete(recursive: true).unwrap(context: context);
if (await dir2.exists()) {
if (!context.mounted) return;
await dir2.delete(recursive: true).unwrap(context: context);
}
_initState();
}
}
@ -221,4 +227,4 @@ class SettingsUIModel extends _$SettingsUIModel {
userBox.get("isUseInternalDNS", defaultValue: false);
state = state.copyWith(isUseInternalDNS: isUseInternalDNS);
}
}
}