aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-03-21 01:28:31 -0400
committerGitHub <noreply@github.com>2018-03-21 01:28:31 -0400
commitd36dfe98a52ced46c5106b28304ae5d245180a7f (patch)
treea20261ea953b7e29e8754cf641e9ed743511079d /app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
parent6b85bc72a864e65d99ae65802ce03f977a98c906 (diff)
downloadfrost-d36dfe98a52ced46c5106b28304ae5d245180a7f.tar.gz
frost-d36dfe98a52ced46c5106b28304ae5d245180a7f.tar.bz2
frost-d36dfe98a52ced46c5106b28304ae5d245180a7f.zip
Feature/bugsnag (#807)
* Add bugsnag * Remove crashlytics * Remove pro features and iab * Make analytics opt in * Clean settings activity * Clean settings activity 2
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt13
1 files changed, 3 insertions, 10 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
index eeeca01f..314590e2 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt
@@ -11,7 +11,6 @@ import com.pitchedapps.frost.enums.MainActivityLayout
import com.pitchedapps.frost.enums.Theme
import com.pitchedapps.frost.injectors.CssAssets
import com.pitchedapps.frost.utils.*
-import com.pitchedapps.frost.utils.iab.IS_FROST_PRO
import com.pitchedapps.frost.views.KPrefTextSeekbar
/**
@@ -25,22 +24,16 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = {
onClick = {
materialDialogThemed {
title(R.string.theme)
- items(Theme.values()
- .map { if (it == Theme.CUSTOM && !IS_FROST_PRO) R.string.custom_pro else it.textRes }
- .map { string(it) })
+ items(Theme.values().map { string(it.textRes) })
itemsCallbackSingleChoice(item.pref) { _, _, which, _ ->
if (item.pref != which) {
- if (which == Theme.CUSTOM.ordinal && !IS_FROST_PRO) {
- purchasePro()
- return@itemsCallbackSingleChoice true
- }
item.pref = which
shouldRestartMain()
reload()
setFrostTheme(true)
themeExterior()
invalidateOptionsMenu()
- frostAnswersCustom("Theme", "Count" to Theme(which).name)
+ frostEvent("Theme", "Count" to Theme(which).name)
}
true
}
@@ -125,7 +118,7 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = {
if (item.pref != which) {
item.pref = which
shouldRestartMain()
- frostAnswersCustom("Main Layout", "Type" to MainActivityLayout(which).name)
+ frostEvent("Main Layout", "Type" to MainActivityLayout(which).name)
}
true
}