diff --git a/Assets/Scripts/Apis/MapApi.cs b/Assets/Scripts/Apis/MapApi.cs index be738a26..e131195d 100644 --- a/Assets/Scripts/Apis/MapApi.cs +++ b/Assets/Scripts/Apis/MapApi.cs @@ -60,7 +60,7 @@ namespace Assets.Scripts.Apis public Task>> GetList(int pageIndex, int pageSize, string name, string distance="", string hands="", bool is3D=false, string sort="", string sortDire = "", bool isFav = false) { string lngLat = ""; - if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(distance) && string.IsNullOrEmpty(hands) && !is3D && sort.Equals("Near") && !isFav) + if (sort.Equals("Near")) { lngLat = $"{App.longitude},{App.latitude}"; } diff --git a/Assets/Scripts/UI/Prefab/Panel/MapListController.cs b/Assets/Scripts/UI/Prefab/Panel/MapListController.cs index 6b3916bd..9d1e1ec9 100644 --- a/Assets/Scripts/UI/Prefab/Panel/MapListController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/MapListController.cs @@ -181,8 +181,17 @@ public class MapListController : PFUIPanel sort = "Hot"; } var image = sortDir.Find("Image").GetComponent(); - image.sprite = Resources.Load("Images/DOWN"); - sortDire = "desc"; + if (sort == "Near") + { + image.sprite = Resources.Load("Images/UP"); + sortDire = "asc"; + } + else + { + image.sprite = Resources.Load("Images/DOWN"); + sortDire = "desc"; + } + Refresh(); }); }