aboutsummaryrefslogtreecommitdiff
path: root/about/src/main/kotlin/ca/allanwang
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-10-11 14:17:27 -0400
committerGitHub <noreply@github.com>2017-10-11 14:17:27 -0400
commitb87c75d607956393ad3b07751eb59ccf41726863 (patch)
tree28d580e11e1befcc3895f46f52b03966f0f922ec /about/src/main/kotlin/ca/allanwang
parentff597a7ef456fcb37160fa7a46b45296098ca413 (diff)
downloadkau-b87c75d607956393ad3b07751eb59ccf41726863.tar.gz
kau-b87c75d607956393ad3b07751eb59ccf41726863.tar.bz2
kau-b87c75d607956393ad3b07751eb59ccf41726863.zip
fix/misc (#81)
* Remove jvmstatic, fixes #68 * Create HO logging * Remove double null boolean notation * Replace multi if else with when * Ignore case in setSpan, closes #82
Diffstat (limited to 'about/src/main/kotlin/ca/allanwang')
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt6
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt6
2 files changed, 6 insertions, 6 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
index 629aa52..5595aed 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
@@ -1,5 +1,6 @@
package ca.allanwang.kau.about
+import android.annotation.SuppressLint
import android.support.v7.widget.RecyclerView
import android.text.method.LinkMovementMethod
import android.view.View
@@ -22,9 +23,7 @@ class FaqIItem(val content: FaqItem) : KauIItem<LibraryIItem, FaqIItem.ViewHolde
), ThemableIItem by ThemableIItemDelegate() {
companion object {
-
-
- @JvmStatic fun bindEvents(fastAdapter: FastAdapter<IItem<*, *>>) {
+ fun bindEvents(fastAdapter: FastAdapter<IItem<*, *>>) {
fastAdapter.withSelectable(false)
.withEventHook(object : ClickEventHook<IItem<*, *>>() {
@@ -43,6 +42,7 @@ class FaqIItem(val content: FaqItem) : KauIItem<LibraryIItem, FaqIItem.ViewHolde
private var isExpanded = false
+ @SuppressLint("SetTextI18n")
override fun bindView(holder: ViewHolder, payloads: MutableList<Any>?) {
super.bindView(holder, payloads)
with(holder) {
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 e50460e..88e6f9b 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
@@ -25,7 +25,7 @@ class LibraryIItem(val lib: Library) : KauIItem<LibraryIItem, LibraryIItem.ViewH
), ThemableIItem by ThemableIItemDelegate() {
companion object {
- @JvmStatic fun bindEvents(fastAdapter: FastAdapter<IItem<*, *>>) {
+ fun bindEvents(fastAdapter: FastAdapter<IItem<*, *>>) {
fastAdapter.withSelectable(false)
.withOnClickListener { v, _, item, _ ->
if (item !is LibraryIItem) false
@@ -53,11 +53,11 @@ class LibraryIItem(val lib: Library) : KauIItem<LibraryIItem, LibraryIItem.ViewH
Html.fromHtml(lib.libraryDescription, Html.FROM_HTML_MODE_LEGACY)
else Html.fromHtml(lib.libraryDescription)
bottomDivider.gone()
- if (lib.libraryVersion?.isNotBlank() ?: false) {
+ if (lib.libraryVersion?.isNotBlank() == true) {
bottomDivider.visible()
version.visible().text = lib.libraryVersion
}
- if (lib.license?.licenseName?.isNotBlank() ?: false) {
+ if (lib.license?.licenseName?.isNotBlank() == true) {
bottomDivider.visible()
license.visible().text = lib.license?.licenseName
}