diff options
author | Allan Wang <me@allanwang.ca> | 2018-02-13 16:51:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 16:51:56 -0500 |
commit | cdb1bd6eec2c90abc9d3d982814552443c7fc3b2 (patch) | |
tree | 2d21dfcce61fec76384d862b410ee61579169bc2 /about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt | |
parent | f5d6ddb72a3dc369b95631a607471f9a6ea5e70f (diff) | |
download | kau-cdb1bd6eec2c90abc9d3d982814552443c7fc3b2.tar.gz kau-cdb1bd6eec2c90abc9d3d982814552443c7fc3b2.tar.bz2 kau-cdb1bd6eec2c90abc9d3d982814552443c7fc3b2.zip |
Update docs (#135)
* Update docs
* Update format
* Update dependencies
Diffstat (limited to 'about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt')
-rw-r--r-- | about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt index 89906c3..d71f786 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt @@ -47,10 +47,11 @@ class LibraryIItem(val lib: Library) : KauIItem<LibraryIItem, LibraryIItem.ViewH name.text = lib.libraryName creator.text = lib.author @Suppress("DEPRECATION") - description.text = if (lib.libraryDescription.isBlank()) lib.libraryDescription - else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) - Html.fromHtml(lib.libraryDescription, Html.FROM_HTML_MODE_LEGACY) - else Html.fromHtml(lib.libraryDescription) + description.text = when { + lib.libraryDescription.isBlank() -> lib.libraryDescription + Build.VERSION.SDK_INT >= Build.VERSION_CODES.N -> Html.fromHtml(lib.libraryDescription, Html.FROM_HTML_MODE_LEGACY) + else -> Html.fromHtml(lib.libraryDescription) + } bottomDivider.gone() if (lib.libraryVersion?.isNotBlank() == true) { bottomDivider.visible() |