Fix weirdness with icon marketplace still
This commit is contained in:
@@ -195,8 +195,16 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
|||||||
var sellbtn = btnGrid.transform.GetChild(1).GetComponent<Button>();
|
var sellbtn = btnGrid.transform.GetChild(1).GetComponent<Button>();
|
||||||
var buyttnText = buybtn.transform.GetChild(0).GetComponent<TMP_Text>();
|
var buyttnText = buybtn.transform.GetChild(0).GetComponent<TMP_Text>();
|
||||||
|
|
||||||
sellbtn.onClick.AddListener(() => HandleSell(entry, buybtn, buyttnText, sellbtn, localUserID));
|
sellbtn.onClick.AddListener(() =>
|
||||||
buybtn.onClick.AddListener(() => HandlePurchase(entry, buybtn, sellbtn, localUserID));
|
{
|
||||||
|
HandleSell(entry, buybtn, buyttnText, sellbtn, localUserID);
|
||||||
|
Tools.RefreshHierarchy(newIcon);
|
||||||
|
});
|
||||||
|
buybtn.onClick.AddListener(() =>
|
||||||
|
{
|
||||||
|
HandlePurchase(entry, buybtn, sellbtn, localUserID);
|
||||||
|
Tools.RefreshHierarchy(newIcon);
|
||||||
|
});
|
||||||
bool alreadyBought = BazookaManager.Instance.GetCustomBirdIconData().Data.Any(d => d.UUID == entry.UUID);
|
bool alreadyBought = BazookaManager.Instance.GetCustomBirdIconData().Data.Any(d => d.UUID == entry.UUID);
|
||||||
if (alreadyBought)
|
if (alreadyBought)
|
||||||
{
|
{
|
||||||
@@ -224,7 +232,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
newIcon.SetActive(true);
|
newIcon.SetActive(true);
|
||||||
Tools.RefreshHierarchy(btnGrid.gameObject);
|
Tools.RefreshHierarchy(newIcon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
refreshButton.interactable = true;
|
refreshButton.interactable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user