| | 1 | | using System; |
| | 2 | | using UnityEngine; |
| | 3 | | using UnityEngine.UI; |
| | 4 | | using TMPro; |
| | 5 | | using DCL; |
| | 6 | | using DCL.Helpers; |
| | 7 | | using DCL.Helpers.NFT; |
| | 8 | | using DCL.Interface; |
| | 9 | | using System.Collections; |
| | 10 | |
|
| | 11 | | internal interface INFTPromptHUDView : IDisposable |
| | 12 | | { |
| | 13 | | event Action OnOwnerLabelPointerEnter; |
| | 14 | | event Action OnOwnerLabelPointerExit; |
| | 15 | | event Action OnOwnersTooltipFocusLost; |
| | 16 | | event Action OnOwnersTooltipFocus; |
| | 17 | | event Action OnViewAllPressed; |
| | 18 | | event Action OnOwnersPopupClosed; |
| | 19 | | void SetActive(bool active); |
| | 20 | | bool IsActive(); |
| | 21 | | IOwnersTooltipView GetOwnersTooltip(); |
| | 22 | | IOwnersPopupView GetOwnersPopup(); |
| | 23 | | OwnerInfoElement GetOwnerElementPrefab(); |
| | 24 | | void SetLoading(); |
| | 25 | | void SetNFTInfo(NFTInfoSingleAsset info, string comment); |
| | 26 | | void OnError(string error); |
| | 27 | | } |
| | 28 | |
|
| | 29 | | internal class NFTPromptHUDView : MonoBehaviour, INFTPromptHUDView |
| | 30 | | { |
| | 31 | | private const string MULTIPLE_OWNERS_FORMAT = "{0} owners"; |
| | 32 | | private const int ADDRESS_MAX_CHARS = 11; |
| | 33 | |
|
| | 34 | | public event Action OnOwnerLabelPointerEnter; |
| | 35 | | public event Action OnOwnerLabelPointerExit; |
| | 36 | | public event Action OnOwnersTooltipFocusLost; |
| | 37 | | public event Action OnOwnersTooltipFocus; |
| | 38 | | public event Action OnViewAllPressed; |
| | 39 | | public event Action OnOwnersPopupClosed; |
| | 40 | |
|
| | 41 | | [SerializeField] internal GameObject content; |
| | 42 | | [SerializeField] internal GameObject nftContent; |
| | 43 | | [SerializeField] internal GameObject mainErrorFeedbackContent; |
| | 44 | | [SerializeField] internal GameObject imageErrorFeedbackContent; |
| | 45 | |
|
| | 46 | | [SerializeField] RawImage imageNft; |
| | 47 | | [SerializeField] Image imageNftBackground; |
| | 48 | | [SerializeField] TextMeshProUGUI textNftName; |
| | 49 | | [SerializeField] TextMeshProUGUI textOwner; |
| | 50 | | [SerializeField] TextMeshProUGUI textMultipleOwner; |
| | 51 | | [SerializeField] UIHoverCallback multipleOwnersContainer; |
| | 52 | |
|
| | 53 | | [Header("Last Sale")] [SerializeField] TextMeshProUGUI textLastSaleSymbol; |
| | 54 | | [SerializeField] TextMeshProUGUI textLastSalePrice; |
| | 55 | | [SerializeField] TextMeshProUGUI textLastSaleNeverSold; |
| | 56 | |
|
| | 57 | | [Header("Price")] [SerializeField] TextMeshProUGUI textPriceSymbol; |
| | 58 | | [SerializeField] TextMeshProUGUI textPrice; |
| | 59 | | [SerializeField] TextMeshProUGUI textPriceNotForSale; |
| | 60 | |
|
| | 61 | | [Header("Description & Comment")] |
| | 62 | | [SerializeField] |
| | 63 | | TextMeshProUGUI textDescription; |
| | 64 | |
|
| | 65 | | [SerializeField] TextMeshProUGUI textComment; |
| | 66 | | [SerializeField] GameObject containerDescription; |
| | 67 | | [SerializeField] GameObject containerComment; |
| | 68 | |
|
| | 69 | | [Header("Spinners")] [SerializeField] GameObject spinnerGeneral; |
| | 70 | | [SerializeField] GameObject spinnerNftImage; |
| | 71 | |
|
| | 72 | | [Header("Buttons")] [SerializeField] internal Button buttonClose; |
| | 73 | | [SerializeField] internal Button buttonCancel; |
| | 74 | | [SerializeField] internal Button buttonOpenMarket; |
| | 75 | | [SerializeField] TextMeshProUGUI textOpenMarketButton; |
| | 76 | |
|
| | 77 | | [Header("Owners")] |
| | 78 | | [SerializeField] internal OwnerInfoElement ownerElementPrefab; |
| | 79 | | [SerializeField] internal OwnersTooltipView ownersTooltip; |
| | 80 | | [SerializeField] internal OwnersPopupView ownersPopup; |
| | 81 | |
|
| | 82 | | Coroutine fetchNFTImageRoutine = null; |
| | 83 | |
|
| | 84 | | private IPromiseLike_TextureAsset imagePromise = null; |
| | 85 | | private GifPlayer gifPlayer = null; |
| | 86 | |
|
| | 87 | | private string nftTokenId; |
| | 88 | | bool backgroundColorSet = false; |
| | 89 | | string marketUrl = null; |
| | 90 | |
|
| | 91 | | private bool isDestroyed = false; |
| | 92 | | internal IWrappedTextureHelper wrappedTextureHelper; |
| | 93 | |
|
| | 94 | | private void Awake() |
| | 95 | | { |
| 7 | 96 | | wrappedTextureHelper = new WrappedTextureUtils(); |
| 7 | 97 | | name = "_NFTPromptHUD"; |
| | 98 | |
|
| 7 | 99 | | buttonClose.onClick.AddListener(Hide); |
| 7 | 100 | | buttonCancel.onClick.AddListener(Hide); |
| 7 | 101 | | buttonOpenMarket.onClick.AddListener(OpenMarketUrl); |
| | 102 | |
|
| 7 | 103 | | multipleOwnersContainer.OnPointerEnter += OwnerLabelPointerEnter; |
| 7 | 104 | | multipleOwnersContainer.OnPointerExit += OwnerLabelPointerExit; |
| 7 | 105 | | ownersTooltip.OnViewAllPressed += OnViewAllOwnersPressed; |
| 7 | 106 | | ownersTooltip.OnFocusLost += OnOwnersTooltipLostFocus; |
| 7 | 107 | | ownersTooltip.OnFocus += OnOwnersTooltipGainFocus; |
| 7 | 108 | | ownersPopup.OnClosePopup += OnOwnersPopupClose; |
| 7 | 109 | | } |
| | 110 | |
|
| | 111 | | public void Dispose() |
| | 112 | | { |
| 7 | 113 | | if (!isDestroyed) |
| | 114 | | { |
| 7 | 115 | | Destroy(gameObject); |
| | 116 | | } |
| 7 | 117 | | } |
| | 118 | |
|
| | 119 | | internal void Hide() |
| | 120 | | { |
| 1 | 121 | | content.SetActive(false); |
| | 122 | |
|
| 1 | 123 | | ForgetPromises(); |
| | 124 | |
|
| 1 | 125 | | if (fetchNFTImageRoutine != null) |
| 0 | 126 | | StopCoroutine(fetchNFTImageRoutine); |
| | 127 | |
|
| 1 | 128 | | fetchNFTImageRoutine = null; |
| | 129 | |
|
| 1 | 130 | | AudioScriptableObjects.dialogClose.Play(true); |
| 1 | 131 | | } |
| | 132 | |
|
| 1 | 133 | | IOwnersPopupView INFTPromptHUDView.GetOwnersPopup() { return ownersPopup; } |
| | 134 | |
|
| 1 | 135 | | IOwnersTooltipView INFTPromptHUDView.GetOwnersTooltip() { return ownersTooltip; } |
| | 136 | |
|
| 16 | 137 | | void INFTPromptHUDView.SetActive(bool active) { content.SetActive(active); } |
| | 138 | |
|
| 1 | 139 | | bool INFTPromptHUDView.IsActive() { return content.activeSelf; } |
| | 140 | |
|
| 7 | 141 | | OwnerInfoElement INFTPromptHUDView.GetOwnerElementPrefab() { return ownerElementPrefab; } |
| | 142 | |
|
| | 143 | | void INFTPromptHUDView.SetLoading() |
| | 144 | | { |
| 1 | 145 | | Show(); |
| | 146 | |
|
| 1 | 147 | | if (fetchNFTImageRoutine != null) |
| 0 | 148 | | StopCoroutine(fetchNFTImageRoutine); |
| | 149 | |
|
| 1 | 150 | | imageNftBackground.color = Color.white; |
| | 151 | |
|
| 1 | 152 | | imageNft.gameObject.SetActive(false); |
| 1 | 153 | | textNftName.gameObject.SetActive(false); |
| 1 | 154 | | textOwner.gameObject.SetActive(false); |
| 1 | 155 | | multipleOwnersContainer.gameObject.SetActive(false); |
| 1 | 156 | | textLastSaleSymbol.gameObject.SetActive(false); |
| 1 | 157 | | textLastSalePrice.gameObject.SetActive(false); |
| 1 | 158 | | textLastSaleNeverSold.gameObject.SetActive(false); |
| 1 | 159 | | textPriceSymbol.gameObject.SetActive(false); |
| 1 | 160 | | textPrice.gameObject.SetActive(false); |
| 1 | 161 | | textPriceNotForSale.gameObject.SetActive(false); |
| 1 | 162 | | containerDescription.SetActive(false); |
| 1 | 163 | | containerComment.SetActive(false); |
| 1 | 164 | | buttonCancel.gameObject.SetActive(false); |
| 1 | 165 | | buttonOpenMarket.gameObject.SetActive(false); |
| | 166 | |
|
| 1 | 167 | | nftContent.SetActive(false); |
| 1 | 168 | | ShowImageLoading(false); |
| 1 | 169 | | ShowMainLoading(true); |
| 1 | 170 | | ShowMainErrorFeedback(false); |
| 1 | 171 | | } |
| | 172 | |
|
| | 173 | | void INFTPromptHUDView.SetNFTInfo(NFTInfoSingleAsset info, string comment) |
| | 174 | | { |
| 0 | 175 | | Show(); |
| | 176 | |
|
| 0 | 177 | | ShowMainLoading(false); |
| 0 | 178 | | nftContent.SetActive(true); |
| | 179 | |
|
| 0 | 180 | | nftTokenId = info.tokenId; |
| 0 | 181 | | imageNftBackground.color = Color.white; |
| 0 | 182 | | backgroundColorSet = info.backgroundColor != null; |
| 0 | 183 | | if (backgroundColorSet) |
| | 184 | | { |
| 0 | 185 | | imageNftBackground.color = info.backgroundColor.Value; |
| | 186 | | } |
| | 187 | |
|
| 0 | 188 | | textNftName.text = info.name; |
| 0 | 189 | | textNftName.gameObject.SetActive(true); |
| | 190 | |
|
| 0 | 191 | | bool hasMultipleOwners = info.owners.Length > 1; |
| 0 | 192 | | if (hasMultipleOwners) |
| | 193 | | { |
| 0 | 194 | | textMultipleOwner.text = string.Format(MULTIPLE_OWNERS_FORMAT, info.owners.Length); |
| 0 | 195 | | } |
| | 196 | | else |
| | 197 | | { |
| 0 | 198 | | textOwner.text = info.owners.Length == 1 |
| | 199 | | ? NFTPromptHUDController.FormatOwnerAddress(info.owners[0].owner, ADDRESS_MAX_CHARS) |
| | 200 | | : NFTPromptHUDController.FormatOwnerAddress("0x0000000000000000000000000000000000000000", ADDRESS_MAX_CH |
| | 201 | | } |
| 0 | 202 | | textOwner.gameObject.SetActive(!hasMultipleOwners); |
| 0 | 203 | | multipleOwnersContainer.gameObject.SetActive(hasMultipleOwners); |
| | 204 | |
|
| 0 | 205 | | if (!string.IsNullOrEmpty(info.lastSaleAmount)) |
| | 206 | | { |
| 0 | 207 | | textLastSalePrice.text = ShortDecimals(info.lastSaleAmount, 4); |
| 0 | 208 | | textLastSalePrice.gameObject.SetActive(true); |
| 0 | 209 | | } |
| | 210 | | else |
| | 211 | | { |
| 0 | 212 | | textLastSaleNeverSold.gameObject.SetActive(true); |
| | 213 | | } |
| | 214 | |
|
| 0 | 215 | | if (!string.IsNullOrEmpty(info.currentPrice)) |
| | 216 | | { |
| 0 | 217 | | textPrice.text = ShortDecimals(info.currentPrice, 4); |
| 0 | 218 | | textPrice.gameObject.SetActive(true); |
| | 219 | |
|
| 0 | 220 | | if (info.currentPriceToken != null) |
| | 221 | | { |
| 0 | 222 | | SetTokenSymbol(textPriceSymbol, info.currentPriceToken.Value.symbol); |
| | 223 | | } |
| 0 | 224 | | } |
| | 225 | | else |
| | 226 | | { |
| 0 | 227 | | textPriceNotForSale.gameObject.SetActive(true); |
| | 228 | | } |
| | 229 | |
|
| 0 | 230 | | if (info.lastSaleToken != null) |
| | 231 | | { |
| 0 | 232 | | SetTokenSymbol(textLastSaleSymbol, info.lastSaleToken.Value.symbol); |
| | 233 | | } |
| | 234 | |
|
| 0 | 235 | | if (!string.IsNullOrEmpty(info.description)) |
| | 236 | | { |
| 0 | 237 | | textDescription.text = info.description; |
| 0 | 238 | | containerDescription.SetActive(true); |
| | 239 | | } |
| | 240 | |
|
| 0 | 241 | | if (!string.IsNullOrEmpty(comment)) |
| | 242 | | { |
| 0 | 243 | | textComment.text = comment; |
| 0 | 244 | | containerComment.SetActive(true); |
| | 245 | | } |
| | 246 | |
|
| 0 | 247 | | textOpenMarketButton.text = "VIEW"; |
| 0 | 248 | | if (info.marketInfo != null) |
| | 249 | | { |
| 0 | 250 | | textOpenMarketButton.text = $"{textOpenMarketButton.text} ON {info.marketInfo.Value.name.ToUpper()}"; |
| | 251 | | } |
| | 252 | |
|
| 0 | 253 | | marketUrl = null; |
| 0 | 254 | | if (!string.IsNullOrEmpty(info.marketLink)) |
| | 255 | | { |
| 0 | 256 | | marketUrl = info.marketLink; |
| 0 | 257 | | } |
| 0 | 258 | | else if (!string.IsNullOrEmpty(info.assetLink)) |
| | 259 | | { |
| 0 | 260 | | marketUrl = info.assetLink; |
| | 261 | | } |
| | 262 | |
|
| 0 | 263 | | buttonCancel.gameObject.SetActive(true); |
| 0 | 264 | | buttonOpenMarket.gameObject.SetActive(true); |
| | 265 | |
|
| 0 | 266 | | fetchNFTImageRoutine = StartCoroutine(FetchNFTImage(info)); |
| 0 | 267 | | } |
| | 268 | |
|
| | 269 | | private void Show() |
| | 270 | | { |
| 1 | 271 | | content.SetActive(true); |
| 1 | 272 | | Utils.UnlockCursor(); |
| 1 | 273 | | } |
| | 274 | |
|
| | 275 | | private IEnumerator FetchNFTImage(NFTInfoSingleAsset nftInfo) |
| | 276 | | { |
| 0 | 277 | | ShowImageErrorFeedback(false); |
| 0 | 278 | | ShowImageLoading(true); |
| | 279 | |
|
| 0 | 280 | | bool imageFound = false; |
| | 281 | |
|
| 0 | 282 | | yield return wrappedTextureHelper.Fetch(nftInfo.previewImageUrl, |
| | 283 | | promise => |
| | 284 | | { |
| 0 | 285 | | imagePromise?.Forget(); |
| 0 | 286 | | imagePromise = promise; |
| 0 | 287 | | imageFound = true; |
| 0 | 288 | | }); |
| | 289 | |
|
| 0 | 290 | | if (!imageFound) |
| | 291 | | { |
| 0 | 292 | | yield return wrappedTextureHelper.Fetch(nftInfo.originalImageUrl, |
| | 293 | | promise => |
| | 294 | | { |
| 0 | 295 | | imagePromise?.Forget(); |
| 0 | 296 | | imagePromise = promise; |
| 0 | 297 | | imageFound = true; |
| 0 | 298 | | }); |
| | 299 | | } |
| | 300 | |
|
| 0 | 301 | | if (imageFound && imagePromise?.asset != null) |
| | 302 | | { |
| 0 | 303 | | Texture2D texture = imagePromise.asset.texture; |
| 0 | 304 | | imageNft.texture = texture; |
| | 305 | |
|
| 0 | 306 | | if ((imagePromise.asset is Asset_Gif gif)) |
| | 307 | | { |
| 0 | 308 | | SetupGifPlayer(gif); |
| 0 | 309 | | } |
| 0 | 310 | | else if (!backgroundColorSet) |
| | 311 | | { |
| 0 | 312 | | SetSmartBackgroundColor(texture); |
| | 313 | | } |
| | 314 | |
|
| 0 | 315 | | SetNFTImageSize(texture); |
| | 316 | |
|
| 0 | 317 | | imageNft.gameObject.SetActive(true); |
| 0 | 318 | | ShowImageLoading(false); |
| 0 | 319 | | } |
| | 320 | | else |
| | 321 | | { |
| 0 | 322 | | ShowImageErrorFeedback(true); |
| | 323 | | } |
| 0 | 324 | | } |
| | 325 | |
|
| | 326 | | private void SetNFTImageSize(Texture2D texture) |
| | 327 | | { |
| 0 | 328 | | RectTransform rt = (RectTransform)imageNft.transform.parent; |
| | 329 | | float h, w; |
| 0 | 330 | | if (texture.height > texture.width) |
| | 331 | | { |
| 0 | 332 | | h = rt.rect.height; |
| 0 | 333 | | w = h * (texture.width / (float)texture.height); |
| 0 | 334 | | } |
| | 335 | | else |
| | 336 | | { |
| 0 | 337 | | w = rt.rect.width; |
| 0 | 338 | | h = w * (texture.height / (float)texture.width); |
| | 339 | | } |
| | 340 | |
|
| 0 | 341 | | imageNft.rectTransform.sizeDelta = new Vector2(w, h); |
| 0 | 342 | | } |
| | 343 | |
|
| | 344 | | private string ShortDecimals(string value, int decimalCount) |
| | 345 | | { |
| 0 | 346 | | int pointPosition = value.IndexOf('.'); |
| 0 | 347 | | if (pointPosition <= 0) |
| 0 | 348 | | return value; |
| | 349 | |
|
| 0 | 350 | | string ret = value.Substring(0, pointPosition + Mathf.Min(value.Length - pointPosition, decimalCount + 1)); |
| | 351 | |
|
| 0 | 352 | | for (int i = ret.Length - 1; i >= 0; i--) |
| | 353 | | { |
| 0 | 354 | | if (ret[i] == '.') |
| | 355 | | { |
| 0 | 356 | | return ret.Substring(0, i); |
| | 357 | | } |
| | 358 | |
|
| 0 | 359 | | if (ret[i] != '0') |
| | 360 | | { |
| 0 | 361 | | return ret.Substring(0, i + 1); |
| | 362 | | } |
| | 363 | | } |
| | 364 | |
|
| 0 | 365 | | return ret; |
| | 366 | | } |
| | 367 | |
|
| 0 | 368 | | private void SetSmartBackgroundColor(Texture2D texture) { imageNftBackground.color = texture.GetPixel(0, 0); } |
| | 369 | |
|
| | 370 | | private void SetTokenSymbol(TextMeshProUGUI textToken, string symbol) |
| | 371 | | { |
| 0 | 372 | | textToken.text = symbol; |
| 0 | 373 | | textToken.gameObject.SetActive(true); |
| 0 | 374 | | } |
| | 375 | |
|
| | 376 | | private void OpenMarketUrl() |
| | 377 | | { |
| 0 | 378 | | if (!string.IsNullOrEmpty(marketUrl)) |
| | 379 | | { |
| 0 | 380 | | WebInterface.OpenURL(marketUrl); |
| 0 | 381 | | AnalyticsHelper.SendExternalLinkAnalytic(marketUrl, nftTokenId); |
| 0 | 382 | | } |
| | 383 | | else |
| | 384 | | { |
| 0 | 385 | | Hide(); |
| | 386 | | } |
| 0 | 387 | | } |
| | 388 | |
|
| | 389 | | void INFTPromptHUDView.OnError(string error) |
| | 390 | | { |
| 0 | 391 | | Debug.LogError(error); |
| 0 | 392 | | ShowMainErrorFeedback(true); |
| 0 | 393 | | } |
| | 394 | |
|
| | 395 | | private void OnDestroy() |
| | 396 | | { |
| 7 | 397 | | isDestroyed = true; |
| | 398 | |
|
| 7 | 399 | | multipleOwnersContainer.OnPointerEnter -= OwnerLabelPointerEnter; |
| 7 | 400 | | multipleOwnersContainer.OnPointerExit -= OwnerLabelPointerExit; |
| 7 | 401 | | ownersTooltip.OnViewAllPressed -= OnViewAllOwnersPressed; |
| 7 | 402 | | ownersTooltip.OnFocusLost -= OnOwnersTooltipLostFocus; |
| 7 | 403 | | ownersTooltip.OnFocus -= OnOwnersTooltipGainFocus; |
| 7 | 404 | | ownersPopup.OnClosePopup -= OnOwnersPopupClose; |
| | 405 | |
|
| 7 | 406 | | ForgetPromises(); |
| 7 | 407 | | } |
| | 408 | |
|
| | 409 | | private void ForgetPromises() |
| | 410 | | { |
| 8 | 411 | | if (imagePromise != null) |
| | 412 | | { |
| 0 | 413 | | imagePromise.Forget(); |
| 0 | 414 | | imagePromise = null; |
| | 415 | | } |
| 8 | 416 | | gifPlayer?.Dispose(); |
| 8 | 417 | | gifPlayer = null; |
| 8 | 418 | | } |
| | 419 | |
|
| | 420 | | private void SetupGifPlayer(Asset_Gif gif) |
| | 421 | | { |
| 0 | 422 | | if (gifPlayer == null) |
| | 423 | | { |
| 0 | 424 | | gifPlayer = new GifPlayer(); |
| 0 | 425 | | gifPlayer.OnFrameTextureChanged += (texture) => { imageNft.texture = texture; }; |
| | 426 | | } |
| 0 | 427 | | gifPlayer.SetGif(gif); |
| 0 | 428 | | gifPlayer.Play(true); |
| 0 | 429 | | } |
| | 430 | |
|
| 0 | 431 | | private void OnViewAllOwnersPressed() { OnViewAllPressed?.Invoke(); } |
| | 432 | |
|
| 0 | 433 | | private void OnOwnersTooltipGainFocus() { OnOwnersTooltipFocus?.Invoke(); } |
| | 434 | |
|
| 0 | 435 | | private void OnOwnersTooltipLostFocus() { OnOwnersTooltipFocusLost?.Invoke(); } |
| | 436 | |
|
| 0 | 437 | | private void OnOwnersPopupClose() { OnOwnersPopupClosed?.Invoke(); } |
| | 438 | |
|
| 0 | 439 | | private void OwnerLabelPointerEnter() { OnOwnerLabelPointerEnter?.Invoke(); } |
| | 440 | |
|
| 0 | 441 | | private void OwnerLabelPointerExit() { OnOwnerLabelPointerExit?.Invoke(); } |
| | 442 | |
|
| | 443 | | private void ShowMainLoading(bool isVisible) |
| | 444 | | { |
| 1 | 445 | | if (spinnerGeneral == null) |
| 0 | 446 | | return; |
| | 447 | |
|
| 1 | 448 | | spinnerGeneral.SetActive(isVisible); |
| 1 | 449 | | } |
| | 450 | |
|
| | 451 | | private void ShowMainErrorFeedback(bool isVisible) |
| | 452 | | { |
| 1 | 453 | | if (mainErrorFeedbackContent == null) |
| 0 | 454 | | return; |
| | 455 | |
|
| 1 | 456 | | if (isVisible) |
| 0 | 457 | | ShowMainLoading(false); |
| | 458 | |
|
| 1 | 459 | | mainErrorFeedbackContent.SetActive(isVisible); |
| 1 | 460 | | } |
| | 461 | |
|
| | 462 | | private void ShowImageLoading(bool isVisible) |
| | 463 | | { |
| 1 | 464 | | if (spinnerNftImage == null) |
| 0 | 465 | | return; |
| | 466 | |
|
| 1 | 467 | | spinnerNftImage.SetActive(isVisible); |
| 1 | 468 | | } |
| | 469 | |
|
| | 470 | | private void ShowImageErrorFeedback(bool isVisible) |
| | 471 | | { |
| 0 | 472 | | if (imageErrorFeedbackContent == null) |
| 0 | 473 | | return; |
| | 474 | |
|
| 0 | 475 | | if (isVisible) |
| 0 | 476 | | ShowImageLoading(false); |
| | 477 | |
|
| 0 | 478 | | imageErrorFeedbackContent.SetActive(isVisible); |
| 0 | 479 | | } |
| | 480 | | } |