diff --git a/Assets/Scripts/UI/Prefab/Panel/EditUserController.cs b/Assets/Scripts/UI/Prefab/Panel/EditUserController.cs index 6c5aae40..24fae4b0 100644 --- a/Assets/Scripts/UI/Prefab/Panel/EditUserController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/EditUserController.cs @@ -286,7 +286,14 @@ public class EditUserController : PFUIPanel void Save(BaseEventData e) { //UIManager.ShowConfirm("Confirm", "Are you sure to edit?", SaveFunc); - SaveFunc(); + try + { + SaveFunc(); + } + catch (Exception ex) + { + Utils.showToast(gameObject, ex.Message); + } //App.CurrentUser = user; //UIManager.ShowAlert("result.errMsg"); diff --git a/Assets/Scripts/UI/Prefab/Panel/HomeController.cs b/Assets/Scripts/UI/Prefab/Panel/HomeController.cs index 95954bb9..27454648 100644 --- a/Assets/Scripts/UI/Prefab/Panel/HomeController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/HomeController.cs @@ -6,6 +6,7 @@ using DG.Tweening; using System; using System.Collections; using System.Collections.Generic; +using System.Globalization; using System.Threading.Tasks; using UnityEngine; using UnityEngine.Events; @@ -152,9 +153,9 @@ public class HomeController : PFUIPanel Utils.DisplayHead(userInfo.Find("Avatar").GetComponent(), App.CurrentUser.WxHeadImg); userInfo.Find("Country").GetComponent().texture = UIManager.Instance.loginRegOptions.GetCountryImageByName(App.CurrentUser.Country); - userInfo.Find("CaloriesContainer").Find("CaloriesValue").GetComponent().text = double.Parse(summary.Kcal).ToString("0") +" KCAL"; + userInfo.Find("CaloriesContainer").Find("CaloriesValue").GetComponent().text = double.Parse(summary.Kcal,CultureInfo.InvariantCulture).ToString("0") +" KCAL"; userInfo.Find("KMContainer").Find("KMValue").GetComponent().text = summary.TotalDistance.ToString("0") +" KM"; - userInfo.Find("ClimbContainer").Find("ClimbValue").GetComponent().text = summary.TotalClimb +" M"; + userInfo.Find("ClimbContainer").Find("ClimbValue").GetComponent().text = double.Parse(summary.TotalClimb,CultureInfo.InvariantCulture).ToString("0") + " M"; userInfo.Find("GroupTop").Find("FtpContainer").Find("FtpTime").GetComponent().text = App.CurrentUser.LastUpdateFtpTime.ToString("dd.MM.yyyy"); userInfo.Find("GroupTop").Find("WeightContainer").Find("WeightTime").GetComponent().text = App.CurrentUser.LastUpdateWeightTime.ToString("dd.MM.yyyy");