From 44f74004ebd65d4a5371cb13388b7f776d748c42 Mon Sep 17 00:00:00 2001 From: xkeyC <3334969096@qq.com> Date: Sun, 17 Mar 2024 20:47:06 +0800 Subject: [PATCH] fix: home game location scan --- lib/ui/home/home_ui_model.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ui/home/home_ui_model.dart b/lib/ui/home/home_ui_model.dart index 467f229..d1d5f45 100644 --- a/lib/ui/home/home_ui_model.dart +++ b/lib/ui/home/home_ui_model.dart @@ -87,9 +87,13 @@ class HomeUIModel extends _$HomeUIModel { } final scInstallPaths = await SCLoggerHelper.getGameInstallPath(listData, withVersion: ["LIVE", "PTU", "EPTU"], checkExists: true); - String? scInstalledPath; + + String scInstalledPath = "not_install"; + if (scInstallPaths.isNotEmpty) { - scInstalledPath = scInstallPaths.first; + if (scInstallPaths.first.isNotEmpty) { + scInstalledPath = scInstallPaths.first; + } } final lastScreenInfo = S.current .home_action_info_scan_complete_valid_directories_found(