aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/settings
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/settings')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt13
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt5
2 files changed, 3 insertions, 15 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
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
index 78898eeb..5de68e21 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
@@ -46,14 +46,11 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = {
descRes = R.string.composer_desc
}
- header(R.string.pro_features)
-
checkbox(R.string.suggested_friends, Prefs::showSuggestedFriends, {
Prefs.showSuggestedFriends = it
setFrostResult(REQUEST_REFRESH)
}) {
descRes = R.string.suggested_friends_desc
- dependsOnPro()
}
checkbox(R.string.suggested_groups, Prefs::showSuggestedGroups, {
@@ -61,7 +58,6 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = {
setFrostResult(REQUEST_REFRESH)
}) {
descRes = R.string.suggested_groups_desc
- dependsOnPro()
}
checkbox(R.string.facebook_ads, Prefs::showFacebookAds, {
@@ -69,6 +65,5 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = {
setFrostResult(REQUEST_REFRESH)
}) {
descRes = R.string.facebook_ads_desc
- dependsOnPro()
}
} \ No newline at end of file