mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-22 21:03: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 {
|
||||
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 = "生成补丁 ...";
|
||||
final newScript =
|
||||
await _genNewScript(assarState).unwrap(context: context);
|
||||
|
@ -594,6 +594,15 @@ class ToolsUIModel extends _$ToolsUIModel {
|
||||
}
|
||||
|
||||
_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(
|
||||
context: context,
|
||||
builder: (BuildContext context) => const RsiLauncherEnhanceDialogUI());
|
||||
|
Loading…
Reference in New Issue
Block a user