Skip to content

Commit

Permalink
prevent navigation outside discoverNftsWebView
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed Sep 1, 2023
1 parent 4f4b067 commit f885e0f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/dashboard/discover/view/discover_tab_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class _DiscoverTabPageViewState extends State<DiscoverTabPageView>
if (!request.url.startsWith(
Urls.discoverNftsWebView,
)) {
await LaunchUrl.launch(request.url);
// await LaunchUrl.launch(request.url);
return NavigationDecision.prevent;
} else {
return NavigationDecision.navigate;
Expand All @@ -138,11 +138,8 @@ class _DiscoverTabPageViewState extends State<DiscoverTabPageView>
MWebViewPage(
url: Urls.discoverCoinsWebView,
onNavigationRequest: (request) async {
if ((!request.url
.startsWith(Urls.discoverCoinsWebView)) ||
request.url.startsWith(
'https://discover-coins-part.webflow.io/prod-nota-available/nft-noir',
)) {
if (!request.url
.startsWith(Urls.discoverCoinsWebView)) {
/// if a link has a different base URL than the
/// current webpage, it should be opened in an
/// external browser because of dynamic links
Expand Down

0 comments on commit f885e0f

Please sign in to comment.