mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Fix an issue where an application turns to a white screen after finishing cloudflare verification. Close #169
This commit is contained in:
@@ -52,7 +52,7 @@ class _App {
|
||||
BuildContext get rootContext => rootNavigatorKey.currentContext!;
|
||||
|
||||
void rootPop() {
|
||||
rootNavigatorKey.currentState?.pop();
|
||||
rootNavigatorKey.currentState?.maybePop();
|
||||
}
|
||||
|
||||
void pop() {
|
||||
|
@@ -152,6 +152,7 @@ void passCloudflare(CloudflareException e, void Function() onFinished) async {
|
||||
);
|
||||
webview.open();
|
||||
} else {
|
||||
bool success = false;
|
||||
void check(InAppWebViewController controller) async {
|
||||
var head = await controller.evaluateJavascript(
|
||||
source: "document.head.innerHTML") as String;
|
||||
@@ -176,7 +177,10 @@ void passCloudflare(CloudflareException e, void Function() onFinished) async {
|
||||
return;
|
||||
}
|
||||
SingleInstanceCookieJar.instance?.saveFromResponse(uri, cookies);
|
||||
if (!success) {
|
||||
App.rootPop();
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user