mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-26 11:14:11 +01:00
set launchUrl mode to LaunchMode.externalApplication
This commit is contained in:
@@ -19,7 +19,7 @@ class OrderDetailsViewModel = OrderDetailsViewModelBase
|
||||
|
||||
abstract class OrderDetailsViewModelBase with Store {
|
||||
OrderDetailsViewModelBase({required WalletBase wallet, required Order orderForDetails})
|
||||
: items = ObservableList<StandartListItem>(),
|
||||
: items = ObservableList<StandartListItem>(),
|
||||
order = orderForDetails {
|
||||
if (order.provider != null) {
|
||||
switch (order.provider) {
|
||||
@@ -101,13 +101,13 @@ abstract class OrderDetailsViewModelBase with Store {
|
||||
TrackTradeListItem(
|
||||
title: S.current.track,
|
||||
value: buildURL,
|
||||
onTap: () {
|
||||
onTap: () async {
|
||||
try {
|
||||
launch(buildURL);
|
||||
final uri = Uri.parse(buildURL);
|
||||
if (await canLaunchUrl(uri))
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} catch (e) {}
|
||||
}
|
||||
)
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ abstract class TradeDetailsViewModelBase with Store {
|
||||
void _launchUrl(String url) {
|
||||
final uri = Uri.parse(url);
|
||||
try {
|
||||
launchUrl(uri);
|
||||
launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,9 +99,10 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
items.add(BlockExplorerListItem(
|
||||
title: S.current.view_in_block_explorer,
|
||||
value: _explorerDescription(type),
|
||||
onTap: () {
|
||||
onTap: () async {
|
||||
try {
|
||||
launch(_explorerUrl(type, tx.id));
|
||||
final uri = Uri.parse(_explorerUrl(type, tx.id));
|
||||
if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} catch (e) {}
|
||||
}));
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ abstract class UnspentCoinsDetailsViewModelBase with Store {
|
||||
onTap: () {
|
||||
try {
|
||||
final url = Uri.parse(_explorerUrl(_type, unspentCoinsItem.hash));
|
||||
return launchUrl(url);
|
||||
return launchUrl(url, mode: LaunchMode.externalApplication);
|
||||
} catch (e) {}
|
||||
},
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user