Skip to content

Commit

Permalink
Merge pull request #1543 from bitmark-inc/irl_owner_param
Browse files Browse the repository at this point in the history
fix: pass owner to yoko ono irl
  • Loading branch information
phuocbitmark authored Feb 23, 2024
2 parents e314402 + 65ec199 commit 553b96f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
18 changes: 7 additions & 11 deletions lib/screen/detail/artwork_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
Future<void> _shareMemento(BuildContext context, AssetToken asset) async {
final deeplink = await _airdropService.shareAirdrop(asset);
if (deeplink == null) {
if (!mounted) {
if (!context.mounted) {
return;
}
context
Expand All @@ -187,7 +187,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
await Share.share(shareMessage);
} catch (e) {
if (e is DioException) {
if (mounted) {
if (context.mounted) {
unawaited(UIHelper.showSharePostcardFailed(context, e));
}
}
Expand Down Expand Up @@ -433,7 +433,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
final addressIndex = owner?.second;
final irlUrl = asset.irlTapLink;

if (!mounted) {
if (!context.mounted) {
return;
}
final isHidden = _isHidden(asset);
Expand Down Expand Up @@ -489,7 +489,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
downloadProgress.value = received / total;
});
});
if (!mounted) {
if (!context.mounted) {
return;
}
setState(() {
Expand All @@ -502,7 +502,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
unawaited(UIHelper.showFeralfileArtworkSavedFailed(context));
}
} catch (e) {
if (!mounted) {
if (!context.mounted) {
return;
}
setState(() {
Expand All @@ -523,7 +523,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
.updateTempStorageHiddenTokenIDs([asset.id], !isHidden);
unawaited(injector<SettingsDataService>().backup());

if (!mounted) {
if (!context.mounted) {
return;
}
NftCollectionBloc.eventController.add(ReloadEvent());
Expand Down Expand Up @@ -564,7 +564,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
.updateTempStorageHiddenTokenIDs([asset.id], false);
unawaited(injector<SettingsDataService>().backup());
}
if (!mounted) {
if (!context.mounted) {
return;
}
setState(() {});
Expand All @@ -575,10 +575,6 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
}
return;
}

if (!mounted) {
return;
}
unawaited(UIHelper.showMessageAction(
context,
'success'.tr(),
Expand Down
2 changes: 1 addition & 1 deletion lib/util/asset_token_ext.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
}
}
Expand Down

0 comments on commit 553b96f

Please sign in to comment.