aboutsummaryrefslogtreecommitdiff
path: root/about/src/main/kotlin/ca/allanwang
diff options
context:
space:
mode:
Diffstat (limited to 'about/src/main/kotlin/ca/allanwang')
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt10
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt5
2 files changed, 10 insertions, 5 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 d17c3ec..5c3a00b 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
}
@@ -77,8 +79,10 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde
super.onCreate(savedInstanceState)
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!!)
+ pageStatus[0] = 2 //the first page is instantly visible
+ 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
}
+ }
}
}
}