From 9d3de1e97cb39c382bdcaf4d4fd1f0ad1f84a452 Mon Sep 17 00:00:00 2001 From: lishuo Date: Wed, 20 Jul 2022 17:02:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=88=91=E7=9A=84?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E9=80=89=E6=8B=A9=E9=9B=86=E5=90=88=E5=90=8E?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E5=88=86=E7=B1=BB=E4=B9=9F=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/Prefab/Panel/MapListExtraController.cs | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/UI/Prefab/Panel/MapListExtraController.cs b/Assets/Scripts/UI/Prefab/Panel/MapListExtraController.cs index 730effb2..d0aa7d57 100644 --- a/Assets/Scripts/UI/Prefab/Panel/MapListExtraController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/MapListExtraController.cs @@ -111,29 +111,32 @@ public class MapListExtraController : PFUIPanel } public void HandleCollection() { - if (App.CurrentRouteType == "My Collection") - { - typeSelector.gameObject.SetActive(true); - RefreshCollectList(); - } - else - { - typeSelector.gameObject.SetActive(false); - } p1.localPosition = new Vector3(p1originx, p1.localPosition.y, p1.localPosition.z); p2.localPosition = new Vector3(p2originx, p2.localPosition.y, p2.localPosition.z); typeSelector.Find("Container/Route").GetComponent().color = Utils.HexToColorHtml("#ffffff"); typeSelector.Find("Container1/Collection").GetComponent().color = Utils.HexToColorHtml("#5c5c6e"); SetImageStyle(true); HandleMobileNavCustom(true); - if (App.CurrentSubRouteType == "Route") + + if (App.CurrentRouteType == "My Collection") { - ShowRouteList(); + typeSelector.gameObject.SetActive(true); + RefreshCollectList(); + if (App.CurrentSubRouteType == "Route") + { + ShowRouteList(); + } + else + { + ShowCollectionList(); + } } else { - ShowCollectionList(); + App.CurrentSubRouteType = "Route"; + typeSelector.gameObject.SetActive(false); } + } private async void GetList() { From 200566163aa9acb6c522a8b8fa008230713ee992 Mon Sep 17 00:00:00 2001 From: lishuo Date: Thu, 21 Jul 2022 14:51:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=8A=9F=E7=8E=87?= =?UTF-8?q?=E8=AE=A1=E6=97=A0=E6=B3=95=E5=BC=80=E5=A7=8B=E9=97=AE=E9=A2=98?= =?UTF-8?q?&=E9=99=84=E8=BF=91=E7=9A=84=E4=BA=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs | 7 +++++-- .../Scripts/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs b/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs index 568ae794..53871394 100644 --- a/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs +++ b/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs @@ -604,12 +604,15 @@ namespace Assets.Scenes.Ride.Scripts if (notCachedIds.Count > 0) { var rangeUser = ConfigHelper.mapApi.GetOnlineUserInfo(ids).data; - var rangeRoute = ConfigHelper.mapApi.GetMapRouteInfo(routeIds).data; - App.RouteList.AddRange(rangeRoute); onlineUsers.AddRange(rangeUser); App.userList.AddRange(rangeUser); } } + if (routeIds.Any()) + { + var rangeRoute = ConfigHelper.mapApi.GetMapRouteInfo(routeIds).data; + App.RouteList.AddRange(rangeRoute); + } foreach (var user in onlineUsers) { var item = msgs.FirstOrDefault(u => u.MemberId == user.Id); diff --git a/Assets/Scripts/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs b/Assets/Scripts/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs index 20959527..c18d6d5f 100644 --- a/Assets/Scripts/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs +++ b/Assets/Scripts/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs @@ -141,10 +141,6 @@ namespace Assets.Scenes.Ride.Scripts public bool CheckAnt() { //_antConnector = AntConnector.Instance(); - if (_device == null || App.CurrentUser.FTP <= 0) - { - return false; - } var devices = App.MainDeviceAdapter.GetDevices().Where(d => d.State == DeviceState.Connected && (d.Sensor == SensorType.Trainer || d.Sensor == SensorType.Power)); if (devices.Count() > 0) { @@ -159,6 +155,10 @@ namespace Assets.Scenes.Ride.Scripts { return false; } + if (_device == null || App.CurrentUser.FTP <= 0) + { + return false; + } return true; } //设备列表 From 8e9d49c921cf1064b41c29c8b3681987e65fc440 Mon Sep 17 00:00:00 2001 From: lishuo Date: Thu, 21 Jul 2022 17:45:26 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=99=84=E8=BF=91=E7=9A=84=E4=BA=BA?= =?UTF-8?q?=E4=B8=8E=E7=BA=BF=E8=B7=AF=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= =?UTF-8?q?&=E7=99=BB=E5=87=BA=E5=8F=96=E6=B6=88=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E9=87=8A=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Apis/PfHttpClientHandler.cs | 1 - Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs | 8 +++++--- Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/Apis/PfHttpClientHandler.cs b/Assets/Scripts/Apis/PfHttpClientHandler.cs index 872244a5..4b6cdbe9 100644 --- a/Assets/Scripts/Apis/PfHttpClientHandler.cs +++ b/Assets/Scripts/Apis/PfHttpClientHandler.cs @@ -65,7 +65,6 @@ namespace Assets.Scripts.Apis { //释放资源 MapUDPService.Dispose(); - App.MainDeviceAdapter.Dispose(); //删除本地文件 Helper.DelectDir(PFConstants.MapWorkoutRecordTempFolder); App.tempRecordData = null; diff --git a/Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs b/Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs index 9d9b50bb..1548fe47 100644 --- a/Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs +++ b/Assets/Scripts/Devices/Ble/mobile/BleMobileInterface.cs @@ -457,10 +457,12 @@ namespace Assets.Scripts.Ble { if (bleMobileThread == null) return; - //bleMobileThread.ManagerInitialized -= BleMobileThread_ManagerInitialized; - //bleMobileThread.ManagerStatusChanged -= ManagerStatusChanged; - //bleMobileThread.ScanInfoReceived -= WatcherScanInfoReceived; + bleMobileThread.ManagerInitialized -= BleMobileThread_ManagerInitialized; + bleMobileThread.ManagerStatusChanged -= ManagerStatusChanged; + bleMobileThread.ScanInfoReceived -= WatcherScanInfoReceived; bleMobileThread.Dispose(); + bleMobileThread = null; + hwInterface = null; pCache.Clear(); } diff --git a/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs b/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs index 53871394..2879a0b3 100644 --- a/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs +++ b/Assets/Scripts/Scenes/Ride/Network/MapUDPService.cs @@ -584,7 +584,7 @@ namespace Assets.Scenes.Ride.Scripts var msgs = RemoveExceptionData(mes); //LastActiveTime = DateTime.Now; var ids = msgs.Where(m => onlineUsers.All(u => u.Id != m.MemberId)).Select(m => m.MemberId); - var routeIds = msgs.Where(m => onlineUsers.All(u => u.Id != m.MemberId)).Select(m => m.RouteId); + var routeIds = msgs.Where(m => onlineUsers.All(u => u.RouteId != m.RouteId)).Select(m => m.RouteId); if (ids.Any()) { List notCachedIds = new List(); @@ -603,7 +603,7 @@ namespace Assets.Scenes.Ride.Scripts if (notCachedIds.Count > 0) { - var rangeUser = ConfigHelper.mapApi.GetOnlineUserInfo(ids).data; + var rangeUser = ConfigHelper.mapApi.GetOnlineUserInfo(notCachedIds).data; onlineUsers.AddRange(rangeUser); App.userList.AddRange(rangeUser); } From 0bd5f325de72565680ff058411944cf6becc0e6b Mon Sep 17 00:00:00 2001 From: lishuo Date: Fri, 22 Jul 2022 13:29:01 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=91=E7=9A=84?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/Prefab/Panel/UserInfoPanel.prefab | 2 +- Assets/Resources/UI/language.json | 6 +++-- Assets/Scripts/UI/Prefab/MapList/MapItem.cs | 27 +++++++++---------- ProjectSettings/ProjectSettings.asset | 4 +-- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Assets/Resources/UI/Prefab/Panel/UserInfoPanel.prefab b/Assets/Resources/UI/Prefab/Panel/UserInfoPanel.prefab index f9a49824..2ebd35b2 100644 --- a/Assets/Resources/UI/Prefab/Panel/UserInfoPanel.prefab +++ b/Assets/Resources/UI/Prefab/Panel/UserInfoPanel.prefab @@ -2469,7 +2469,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: mType: 3 - Tooltips: CHANGE ACCOUNT + Tooltips: DELETE ACCOUNT --- !u!1 &5404217437987161135 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/UI/language.json b/Assets/Resources/UI/language.json index b9c03004..d154def2 100644 --- a/Assets/Resources/UI/language.json +++ b/Assets/Resources/UI/language.json @@ -377,7 +377,8 @@ "CANCEL": "取消", "Are you sure you want to delete the account?": "是否确认注销账号?", "Delete Your Route": "删除您的线路", - "Are you sure you want to delete this route?": "你确定要删除这条线路吗?" + "Are you sure you want to delete this route?": "你确定要删除这条线路吗?", + "DELETE ACCOUNT": "注销账号" }, "en": { "HOT ROUTES": "HOT ROUTES", @@ -750,6 +751,7 @@ "CANCEL": "CANCEL", "Are you sure you want to delete the account?": "Are you sure you want to delete the account?", "Delete Your Route": "Delete Your Route", - "Are you sure you want to delete this route?": "Are you sure you want to delete this route?" + "Are you sure you want to delete this route?": "Are you sure you want to delete this route?", + "DELETE ACCOUNT": "DELETE ACCOUNT" } } diff --git a/Assets/Scripts/UI/Prefab/MapList/MapItem.cs b/Assets/Scripts/UI/Prefab/MapList/MapItem.cs index dcd60523..12953748 100644 --- a/Assets/Scripts/UI/Prefab/MapList/MapItem.cs +++ b/Assets/Scripts/UI/Prefab/MapList/MapItem.cs @@ -113,28 +113,27 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler, diff.Find("Text").GetComponent().text = myMap.Hard; tabContainer.Find("3d").gameObject.SetActive(myMap.Enable3D); tabContainer.Find("Country").GetComponent().texture = UIManager.Instance.loginRegOptions.GetCountryImage(myMap.CountryCode); - if (!isModal) + transform.Find("CollectImg").GetComponent