Skip to content

Commit

Permalink
Handle the back-press when selecting the cover from the internet and …
Browse files Browse the repository at this point in the history
…there

was a network error.
  • Loading branch information
PaulWoitaschek committed Feb 10, 2019
1 parent 40ae387 commit a77afca
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class CoverFromInternetController(bundle: Bundle) : BaseController(bundle) {
displayZoomControls = false
javaScriptEnabled = true
userAgentString =
"Mozilla/5.0 (Linux; U; Android 4.4; en-us; Nexus 4 Build/JOP24G) " +
"AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"
"Mozilla/5.0 (Linux; U; Android 4.4; en-us; Nexus 4 Build/JOP24G) " +
"AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"
}
webView.webViewClient = object : WebViewClient() {

Expand Down Expand Up @@ -269,6 +269,10 @@ class CoverFromInternetController(bundle: Bundle) : BaseController(bundle) {
return true
}

if (noNetwork.isVisible) {
return false
}

if (webView.canGoBack()) {
webView.goBack()
return true
Expand Down

0 comments on commit a77afca

Please sign in to comment.