Skip to content

Commit

Permalink
fix: pass owner to yoko ono irl
Browse files Browse the repository at this point in the history
Signed-off-by: phuoc <[email protected]>
  • Loading branch information
phuocbitmark committed Feb 23, 2024
1 parent e314402 commit e11a786
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 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 All @@ -449,7 +449,8 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
Navigator.pushNamed(
context,
AppRouter.irlWebView,
arguments: IRLWebScreenPayload(irlUrl.second),
arguments: IRLWebScreenPayload(
'${irlUrl.second}?owner=${asset.owner}'),
),
);
},
Expand Down Expand Up @@ -489,7 +490,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
downloadProgress.value = received / total;
});
});
if (!mounted) {
if (!context.mounted) {
return;
}
setState(() {
Expand All @@ -502,7 +503,7 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
unawaited(UIHelper.showFeralfileArtworkSavedFailed(context));
}
} catch (e) {
if (!mounted) {
if (!context.mounted) {
return;
}
setState(() {
Expand All @@ -523,7 +524,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 +565,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 +576,6 @@ class _ArtworkDetailPageState extends State<ArtworkDetailPage>
}
return;
}

if (!mounted) {
return;
}
unawaited(UIHelper.showMessageAction(
context,
'success'.tr(),
Expand Down

0 comments on commit e11a786

Please sign in to comment.