Skip to content

Commit

Permalink
remove image loading toggle; fix title not update issue
Browse files Browse the repository at this point in the history
  • Loading branch information
plateaukao committed Jan 4, 2022
1 parent 0742ec2 commit e54b493
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,14 @@ open class BrowserActivity : ComponentActivity(), BrowserController, OnClickList

currentAlbumController = controller
currentAlbumController?.activate()
updateTitle()

updateSavedAlbumInfo()
updateWebViewCountUI()

progressBar.visibility = GONE
ninjaWebView = controller as NinjaWebView

updateTitle()
}

override fun updateAutoComplete() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,7 @@ class NinjaWebViewClient(
this.hasAdBlock = enable
}

override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
super.onPageStarted(view, url, favicon)
// to make loading faster, disable loading image first, and then turning it on when page is loaded.
ninjaWebView.settings.blockNetworkImage = true
}

override fun onPageFinished(view: WebView, url: String) {
ninjaWebView.settings.blockNetworkImage = false

if (config.boldFontStyle || config.fontStyleSerif || config.whiteBackground) {
ninjaWebView.updateCssStyle()
}
Expand Down

0 comments on commit e54b493

Please sign in to comment.