diff options
author | Allan Wang <me@allanwang.ca> | 2020-02-23 16:06:45 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2020-02-23 16:06:45 -0800 |
commit | c8b54fd10a08ed53eb7d21578a4fe990fe14e3bc (patch) | |
tree | 0841d112c8c00504ce10ca72ef39e403b69c595c /app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt | |
parent | 4d5aaf541dbfa7d521ebbc5f011a642c83c4b9c5 (diff) | |
download | frost-c8b54fd10a08ed53eb7d21578a4fe990fe14e3bc.tar.gz frost-c8b54fd10a08ed53eb7d21578a4fe990fe14e3bc.tar.bz2 frost-c8b54fd10a08ed53eb7d21578a4fe990fe14e3bc.zip |
Move prefs to service locator
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt index ec9ea73d..55398309 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt @@ -42,12 +42,11 @@ import com.pitchedapps.frost.db.saveTabs import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.iitems.TabIItem import com.pitchedapps.frost.utils.L -import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.setFrostColors -import java.util.Collections import kotlinx.coroutines.NonCancellable import kotlinx.coroutines.launch import org.koin.android.ext.android.inject +import java.util.Collections /** * Created by Allan Wang on 26/11/17. @@ -70,15 +69,15 @@ class TabCustomizerActivity : BaseActivity() { } fun ActivityTabCustomizerBinding.init() { - pseudoToolbar.setBackgroundColor(Prefs.headerColor) + pseudoToolbar.setBackgroundColor(prefs.headerColor) tabRecycler.layoutManager = GridLayoutManager(this@TabCustomizerActivity, TAB_COUNT, RecyclerView.VERTICAL, false) tabRecycler.adapter = adapter tabRecycler.setHasFixedSize(true) - divider.setBackgroundColor(Prefs.textColor.withAlpha(30)) - instructions.setTextColor(Prefs.textColor) + divider.setBackgroundColor(prefs.textColor.withAlpha(30)) + instructions.setTextColor(prefs.textColor) launch { val tabs = genericDao.getTabs().toMutableList() @@ -95,8 +94,8 @@ class TabCustomizerActivity : BaseActivity() { setResult(Activity.RESULT_CANCELED) - fabSave.setIcon(GoogleMaterial.Icon.gmd_check, Prefs.iconColor) - fabSave.backgroundTintList = ColorStateList.valueOf(Prefs.accentColor) + fabSave.setIcon(GoogleMaterial.Icon.gmd_check, prefs.iconColor) + fabSave.backgroundTintList = ColorStateList.valueOf(prefs.accentColor) fabSave.setOnClickListener { launchMain(NonCancellable) { val tabs = adapter.adapterItems.subList(0, TAB_COUNT).map(TabIItem::item) @@ -105,8 +104,8 @@ class TabCustomizerActivity : BaseActivity() { finish() } } - fabCancel.setIcon(GoogleMaterial.Icon.gmd_close, Prefs.iconColor) - fabCancel.backgroundTintList = ColorStateList.valueOf(Prefs.accentColor) + fabCancel.setIcon(GoogleMaterial.Icon.gmd_close, prefs.iconColor) + fabCancel.backgroundTintList = ColorStateList.valueOf(prefs.accentColor) fabCancel.setOnClickListener { finish() } setFrostColors { themeWindow = true |