Skip to content

Commit

Permalink
Improve renderer speed
Browse files Browse the repository at this point in the history
  • Loading branch information
jocmp committed Sep 17, 2024
1 parent 8fb87e8 commit fd58fd2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import kotlin.math.roundToInt
* * [How-to docs](https://developer.android.com/develop/ui/views/layout/webapps/load-local-content#mix-content)
* * [JavaDoc](https://developer.android.com/reference/androidx/webkit/WebViewAssetLoader)
*/
private const val ASSET_BASE_URL = "https://appassets.androidplatform.net"
const val ASSET_BASE_URL = "https://appassets.androidplatform.net"

/**
* A wrapper around the Android View WebView to provide a basic WebView composable.
Expand Down
4 changes: 2 additions & 2 deletions capy/src/main/assets/media.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class ArticleRenderer(
"title" to article.title,
"byline" to byline,
"feed_name" to article.feedName,
"body" to body(article, extractedContent),
"script" to script(article, extractedContent),
"text_size" to textSize.get().slug,
"font_family" to fontOption.get().slug,
Expand All @@ -47,6 +46,8 @@ class ArticleRenderer(
article.siteURL?.let { setBaseUri(it) }
}

document.getElementById("article-body-content")?.append(body(article, extractedContent))

cleanLinks(document)

return document.html()
Expand Down
7 changes: 3 additions & 4 deletions capy/src/main/res/raw/template.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fd58fd2

Please sign in to comment.