Skip to content

Commit 6a07138

Browse files
authored
Merge pull request #2163 from Psychosoc1al/dev
Possible fix for RuStore "Show Source webpage in App view" error
2 parents 0fd496e + 1b039fb commit 6a07138

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/pages/app.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ class _AppPageState extends State<AppPage> {
343343
controller: WebViewController()
344344
..setJavaScriptMode(JavaScriptMode.unrestricted)
345345
..setBackgroundColor(Theme.of(context).colorScheme.surface)
346-
..setJavaScriptMode(JavaScriptMode.unrestricted)
347346
..setNavigationDelegate(
348347
NavigationDelegate(
349348
onWebResourceError: (WebResourceError error) {
@@ -353,6 +352,10 @@ class _AppPageState extends State<AppPage> {
353352
context);
354353
}
355354
},
355+
onNavigationRequest: (NavigationRequest request) =>
356+
request.url.startsWith("rustore://")
357+
? NavigationDecision.prevent
358+
: NavigationDecision.navigate,
356359
),
357360
)
358361
..loadRequest(Uri.parse(app.app.url)))

0 commit comments

Comments
 (0)