Skip to content

Commit

Permalink
feat: ✨ Integrated dapp opens external websites in default browser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chralu committed Nov 28, 2024
1 parent df75a54 commit a342b9e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/infrastructure/rpc/awc_webview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ class _AWCWebviewState extends State<AWCWebview> with WidgetsBindingObserver {
return NavigationActionPolicy.CANCEL;
}

if ((navigationAction.navigationType == null ||
navigationAction.navigationType ==
NavigationType.LINK_ACTIVATED) &&
if (navigationAction.isForMainFrame &&
(uri.scheme != widget.uri.scheme ||
uri.host != widget.uri.host)) {
await _openThirdPartyWebsite(uri);
Expand Down

0 comments on commit a342b9e

Please sign in to comment.