aboutsummaryrefslogtreecommitdiff
path: root/about/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <allanwang@google.com>2019-07-27 20:14:05 -0700
committerAllan Wang <allanwang@google.com>2019-07-27 20:14:05 -0700
commitd6f213563be35b183f81e20e95d925dbd65e4694 (patch)
tree7fd886e82f5e4797727e75858e7ca66d8ad181d4 /about/src/main/kotlin
parenta99e5885a8e67c2609b3c23dff069189c2e62dab (diff)
downloadkau-d6f213563be35b183f81e20e95d925dbd65e4694.tar.gz
kau-d6f213563be35b183f81e20e95d925dbd65e4694.tar.bz2
kau-d6f213563be35b183f81e20e95d925dbd65e4694.zip
Add braces to non assignment if statements
Diffstat (limited to 'about/src/main/kotlin')
-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
}
+ }
}
}
}