aboutsummaryrefslogtreecommitdiff
path: root/about/src
diff options
context:
space:
mode:
Diffstat (limited to 'about/src')
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt8
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt5
2 files changed, 9 insertions, 4 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
index 452d28c..f7eddb9 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
@@ -69,7 +69,9 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde
val panels: List<AboutPanelContract> by lazy {
val defaultPanels = mutableListOf(AboutPanelMain(), AboutPanelLibs())
- if (configs.faqXmlRes != INVALID_ID) defaultPanels.add(AboutPanelFaqs())
+ if (configs.faqXmlRes != INVALID_ID) {
+ defaultPanels.add(AboutPanelFaqs())
+ }
defaultPanels
}
@@ -78,7 +80,9 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde
setContentView(R.layout.kau_activity_about)
pageStatus = IntArray(panels.size)
pageStatus[0] = 2 //the first page is instantly visible
- if (configs.textColor != null) about_indicator.setColour(configs.textColor!!)
+ if (configs.textColor != null) {
+ about_indicator.setColour(configs.textColor!!)
+ }
with(about_pager) {
adapter = AboutPagerAdapter()
pageMargin = dimenPixelSize(R.dimen.kau_spacing_normal)
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 275945b..cd53f55 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
@@ -43,13 +43,14 @@ class LibraryIItem(val lib: Library) : KauIItem<LibraryIItem.ViewHolder>(
fun bindEvents(fastAdapter: FastAdapter<GenericItem>) {
fastAdapter.getSelectExtension().isSelectable = true
fastAdapter.onClickListener = { v, _, item, _ ->
- if (item !is LibraryIItem)
+ if (item !is LibraryIItem) {
false
- else
+ } else {
with(item.lib) {
v!!.context.startLink(libraryWebsite, repositoryLink, authorWebsite)
true
}
+ }
}
}
}