mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-16 21:33:41 +00:00
Preserve existing profile connections when opening more pages
This commit is contained in:
1 parent
ca98806dcc
commit
c47b735fc4
8 files changed
+46
-11
No files matched your search
@@ -3,6 +3,7 @@ import 'dart:collection';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import '../../core/common/start_config.dart';
|
||||
@@ -273,6 +274,9 @@ class WebViewRpcService {
|
||||
if (error is WebViewRpcException) {
|
||||
return {'code': error.code, 'message': error.message};
|
||||
}
|
||||
if (error is PlatformException && error.code == 'UNAVAILABLE') {
|
||||
return {'code': error.code, 'message': error.message ?? 'WebView is unavailable'};
|
||||
}
|
||||
final code = switch (method) {
|
||||
'page.goto' => 'NAVIGATION_FAILED',
|
||||
'page.execute' => 'EVALUATION_FAILED',
|
||||
|
||||
Reference in new issue
Block a user