diff options
author | Allan Wang <me@allanwang.ca> | 2019-12-29 15:50:22 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-29 15:50:22 -0800 |
commit | 0828e8fceec86333f81d5b8cf204184ecc58f0ef (patch) | |
tree | 52c2bef109a430aac85c03494a5fd4515e4455e5 /app/src/main/kotlin/com/pitchedapps/frost/enums | |
parent | ee68ef07ca0f0afd00bfe32f7e7dbba8ef6a6ae2 (diff) | |
parent | 597c884d88b8716d49e0abb00674ce44699df08b (diff) | |
download | frost-0828e8fceec86333f81d5b8cf204184ecc58f0ef.tar.gz frost-0828e8fceec86333f81d5b8cf204184ecc58f0ef.tar.bz2 frost-0828e8fceec86333f81d5b8cf204184ecc58f0ef.zip |
Merge pull request #1601 from AllanWang/nav-rewrite
Nav rewrite
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/enums')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt index a3a4c1a4..92aa93ab 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt @@ -24,23 +24,20 @@ import com.pitchedapps.frost.utils.Prefs */ enum class MainActivityLayout( val titleRes: Int, - val layoutRes: Int, val backgroundColor: () -> Int, val iconColor: () -> Int ) { TOP_BAR(R.string.top_bar, - R.layout.activity_main, { Prefs.headerColor }, { Prefs.iconColor }), BOTTOM_BAR(R.string.bottom_bar, - R.layout.activity_main_bottom_tabs, { Prefs.bgColor }, { Prefs.textColor }); companion object { val values = values() // save one instance - operator fun invoke(index: Int) = values[index] + operator fun invoke(index: Int) = values.getOrElse(index) { TOP_BAR } } } |