diff --git a/src/ST.Client.Desktop.Windows/Services/Implementation/SteamworksLocalApiServiceImpl.cs b/src/ST.Client.Desktop.Windows/Services/Implementation/SteamworksLocalApiServiceImpl.cs index 584072892a8..b5740d8d404 100644 --- a/src/ST.Client.Desktop.Windows/Services/Implementation/SteamworksLocalApiServiceImpl.cs +++ b/src/ST.Client.Desktop.Windows/Services/Implementation/SteamworksLocalApiServiceImpl.cs @@ -88,6 +88,8 @@ public IEnumerable OwnsApps(IEnumerable apps) //IsInstalled = IsAppInstalled(s.AppId) //s.IsInstalled = IsAppInstalled(s.AppId); //s.InstalledDir = GetAppInstallDir(s.AppId); + s.State = IsAppInstalled(s.AppId) ? 4 : s.State; + s.InstalledDir = string.IsNullOrEmpty(s.InstalledDir) ? GetAppInstallDir(s.AppId) : s.InstalledDir; s.Type = Enum.TryParse(GetAppData(s.AppId, "type"), true, out var result) ? result : SteamAppType.Unknown; return s; }); diff --git a/src/ST.Client.Desktop/Services/Implementation/SteamServiceImpl.cs b/src/ST.Client.Desktop/Services/Implementation/SteamServiceImpl.cs index 3c78083b792..6d8e2c47f5a 100644 --- a/src/ST.Client.Desktop/Services/Implementation/SteamServiceImpl.cs +++ b/src/ST.Client.Desktop/Services/Implementation/SteamServiceImpl.cs @@ -825,7 +825,7 @@ private string[] GetLibraryPaths() if (pathNode == null) break; - if (pathNode.Type == VTokenType.Object) + if (pathNode.path != null) { // New format // Valve introduced a new format for the "libraryfolders.vdf" file diff --git a/src/ST.Client.Desktop/UI/ViewModels/Pages/SteamAccountPageViewModel.cs b/src/ST.Client.Desktop/UI/ViewModels/Pages/SteamAccountPageViewModel.cs index 43925991791..8efccb94887 100644 --- a/src/ST.Client.Desktop/UI/ViewModels/Pages/SteamAccountPageViewModel.cs +++ b/src/ST.Client.Desktop/UI/ViewModels/Pages/SteamAccountPageViewModel.cs @@ -89,6 +89,7 @@ public async override void Initialize() return; } + #region 加载备注信息 _SteamUsersSourceList.AddOrUpdate(list); var accountRemarks = Serializable.Clone?>(SteamAccountSettings.AccountRemarks.Value); @@ -97,6 +98,13 @@ public async override void Initialize() string? remark = null; accountRemarks?.TryGetValue(user.SteamId64, out remark); user.Remark = remark; + } + _SteamUsersSourceList.Refresh(); + #endregion + + #region 通过webapi加载头像图片用户信息 + foreach (var user in _SteamUsersSourceList.Items) + { var temp = await webApiService.GetUserInfo(user.SteamId64); if (!string.IsNullOrEmpty(temp.SteamID)) { @@ -124,7 +132,9 @@ public async override void Initialize() } _SteamUsersSourceList.Refresh(); + #endregion + #region 加载动态头像头像框数据 foreach (var item in _SteamUsersSourceList.Items) { item.MiniProfile = await webApiService.GetUserMiniProfile(item.SteamId3_Int); @@ -138,6 +148,7 @@ public async override void Initialize() } _SteamUsersSourceList.Refresh(); + #endregion //this.WhenAnyValue(x => x.SteamUsers) // .Subscribe(items => items?