mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 07:43:42 +08:00
feat: check RSI Launcher running
This commit is contained in:
parent
f6907f233a
commit
6019cc96fd
@ -61,6 +61,15 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void doInstall() async {
|
void doInstall() async {
|
||||||
|
if ((await SystemHelper.getPID("\"RSI Launcher\"")).isNotEmpty) {
|
||||||
|
if (!context.mounted) return;
|
||||||
|
showToast(
|
||||||
|
context, S.current.tools_action_info_rsi_launcher_running_warning,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: MediaQuery.of(context).size.width * .35));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!context.mounted) return;
|
||||||
workingText.value = "生成补丁 ...";
|
workingText.value = "生成补丁 ...";
|
||||||
final newScript =
|
final newScript =
|
||||||
await _genNewScript(assarState).unwrap(context: context);
|
await _genNewScript(assarState).unwrap(context: context);
|
||||||
|
@ -594,6 +594,15 @@ class ToolsUIModel extends _$ToolsUIModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_rsiEnhance(BuildContext context) async {
|
_rsiEnhance(BuildContext context) async {
|
||||||
|
if ((await SystemHelper.getPID("\"RSI Launcher\"")).isNotEmpty) {
|
||||||
|
if (!context.mounted) return;
|
||||||
|
showToast(
|
||||||
|
context, S.current.tools_action_info_rsi_launcher_running_warning,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: MediaQuery.of(context).size.width * .35));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!context.mounted) return;
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) => const RsiLauncherEnhanceDialogUI());
|
builder: (BuildContext context) => const RsiLauncherEnhanceDialogUI());
|
||||||
|
Loading…
Reference in New Issue
Block a user