From e11a786f7cccaf1d99312cc00fc52e16ec177aac Mon Sep 17 00:00:00 2001 From: phuoc Date: Fri, 23 Feb 2024 16:50:04 +0700 Subject: [PATCH] fix: pass owner to yoko ono irl Signed-off-by: phuoc --- lib/screen/detail/artwork_detail_page.dart | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/screen/detail/artwork_detail_page.dart b/lib/screen/detail/artwork_detail_page.dart index 52364e2c1..0ba2bddf4 100644 --- a/lib/screen/detail/artwork_detail_page.dart +++ b/lib/screen/detail/artwork_detail_page.dart @@ -171,7 +171,7 @@ class _ArtworkDetailPageState extends State Future _shareMemento(BuildContext context, AssetToken asset) async { final deeplink = await _airdropService.shareAirdrop(asset); if (deeplink == null) { - if (!mounted) { + if (!context.mounted) { return; } context @@ -187,7 +187,7 @@ class _ArtworkDetailPageState extends State await Share.share(shareMessage); } catch (e) { if (e is DioException) { - if (mounted) { + if (context.mounted) { unawaited(UIHelper.showSharePostcardFailed(context, e)); } } @@ -433,7 +433,7 @@ class _ArtworkDetailPageState extends State final addressIndex = owner?.second; final irlUrl = asset.irlTapLink; - if (!mounted) { + if (!context.mounted) { return; } final isHidden = _isHidden(asset); @@ -449,7 +449,8 @@ class _ArtworkDetailPageState extends State Navigator.pushNamed( context, AppRouter.irlWebView, - arguments: IRLWebScreenPayload(irlUrl.second), + arguments: IRLWebScreenPayload( + '${irlUrl.second}?owner=${asset.owner}'), ), ); }, @@ -489,7 +490,7 @@ class _ArtworkDetailPageState extends State downloadProgress.value = received / total; }); }); - if (!mounted) { + if (!context.mounted) { return; } setState(() { @@ -502,7 +503,7 @@ class _ArtworkDetailPageState extends State unawaited(UIHelper.showFeralfileArtworkSavedFailed(context)); } } catch (e) { - if (!mounted) { + if (!context.mounted) { return; } setState(() { @@ -523,7 +524,7 @@ class _ArtworkDetailPageState extends State .updateTempStorageHiddenTokenIDs([asset.id], !isHidden); unawaited(injector().backup()); - if (!mounted) { + if (!context.mounted) { return; } NftCollectionBloc.eventController.add(ReloadEvent()); @@ -564,7 +565,7 @@ class _ArtworkDetailPageState extends State .updateTempStorageHiddenTokenIDs([asset.id], false); unawaited(injector().backup()); } - if (!mounted) { + if (!context.mounted) { return; } setState(() {}); @@ -575,10 +576,6 @@ class _ArtworkDetailPageState extends State } return; } - - if (!mounted) { - return; - } unawaited(UIHelper.showMessageAction( context, 'success'.tr(),