File tree Expand file tree Collapse file tree
app/src/main/java/to/bitkit/ui/screens/shop Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,13 +38,15 @@ class MapWebViewClient(
3838 )
3939 onLoadingStateChanged(false )
4040
41- error?.let {
42- if (it.errorCode == ERROR_HOST_LOOKUP ||
43- it.errorCode == ERROR_CONNECT ||
44- it.errorCode == ERROR_TIMEOUT ||
45- it.errorCode == ERROR_FILE_NOT_FOUND
46- ) {
47- onError?.invoke()
41+ if (request?.isForMainFrame == true ) {
42+ error?.let {
43+ if (it.errorCode == ERROR_HOST_LOOKUP ||
44+ it.errorCode == ERROR_CONNECT ||
45+ it.errorCode == ERROR_TIMEOUT ||
46+ it.errorCode == ERROR_FILE_NOT_FOUND
47+ ) {
48+ onError?.invoke()
49+ }
4850 }
4951 }
5052 }
Original file line number Diff line number Diff line change @@ -62,13 +62,15 @@ class ShopWebViewClient(
6262 )
6363 onLoadingStateChanged(false )
6464
65- error?.let {
66- if (it.errorCode == ERROR_HOST_LOOKUP ||
67- it.errorCode == ERROR_CONNECT ||
68- it.errorCode == ERROR_TIMEOUT ||
69- it.errorCode == ERROR_FILE_NOT_FOUND
70- ) {
71- onError()
65+ if (request?.isForMainFrame == true ) {
66+ error?.let {
67+ if (it.errorCode == ERROR_HOST_LOOKUP ||
68+ it.errorCode == ERROR_CONNECT ||
69+ it.errorCode == ERROR_TIMEOUT ||
70+ it.errorCode == ERROR_FILE_NOT_FOUND
71+ ) {
72+ onError()
73+ }
7274 }
7375 }
7476 }
You can’t perform that action at this time.
0 commit comments