diff --git a/lib/screen/detail/artwork_detail_page.dart b/lib/screen/detail/artwork_detail_page.dart index 52364e2c1..0755a6513 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); @@ -489,7 +489,7 @@ class _ArtworkDetailPageState extends State downloadProgress.value = received / total; }); }); - if (!mounted) { + if (!context.mounted) { return; } setState(() { @@ -502,7 +502,7 @@ class _ArtworkDetailPageState extends State unawaited(UIHelper.showFeralfileArtworkSavedFailed(context)); } } catch (e) { - if (!mounted) { + if (!context.mounted) { return; } setState(() { @@ -523,7 +523,7 @@ class _ArtworkDetailPageState extends State .updateTempStorageHiddenTokenIDs([asset.id], !isHidden); unawaited(injector().backup()); - if (!mounted) { + if (!context.mounted) { return; } NftCollectionBloc.eventController.add(ReloadEvent()); @@ -564,7 +564,7 @@ class _ArtworkDetailPageState extends State .updateTempStorageHiddenTokenIDs([asset.id], false); unawaited(injector().backup()); } - if (!mounted) { + if (!context.mounted) { return; } setState(() {}); @@ -575,10 +575,6 @@ class _ArtworkDetailPageState extends State } return; } - - if (!mounted) { - return; - } unawaited(UIHelper.showMessageAction( context, 'success'.tr(), diff --git a/lib/util/asset_token_ext.dart b/lib/util/asset_token_ext.dart index 661d629f0..5a814aac2 100644 --- a/lib/util/asset_token_ext.dart +++ b/lib/util/asset_token_ext.dart @@ -395,7 +395,7 @@ extension AssetTokenExtension on AssetToken { return Pair( 'tape_sound'.tr(), '${Environment.feralFileAPIURL}/' - 'artwork/yoko-ono-sound-piece/$index/record', + 'artwork/yoko-ono-sound-piece/$index/record?owner=$owner', ); } }