aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-08-05 00:38:25 -0700
committerGitHub <noreply@github.com>2019-08-05 00:38:25 -0700
commite5b3dbf51bfd63b230bedcaa67893dda82dd66e2 (patch)
treef95c92146c11984f05dd7deb84261c969cdacf33 /app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
parentba2c62a502fa168525b9da9e5cb26edf1901d072 (diff)
parent1e582a31a92ac299db06f32e34be9f0ae6a5120b (diff)
downloadfrost-e5b3dbf51bfd63b230bedcaa67893dda82dd66e2.tar.gz
frost-e5b3dbf51bfd63b230bedcaa67893dda82dd66e2.tar.bz2
frost-e5b3dbf51bfd63b230bedcaa67893dda82dd66e2.zip
Merge pull request #1500 from AllanWang/toggle-main-fab
Allow disabling main fab
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt21
1 files changed, 14 insertions, 7 deletions
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 c764244b..d1350df5 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
@@ -24,7 +24,7 @@ import com.pitchedapps.frost.R
import com.pitchedapps.frost.activities.SettingsActivity
import com.pitchedapps.frost.enums.FeedSort
import com.pitchedapps.frost.utils.Prefs
-import com.pitchedapps.frost.utils.REQUEST_REFRESH
+import com.pitchedapps.frost.utils.REQUEST_FAB
/**
* Created by Allan Wang on 2017-06-29.
@@ -52,42 +52,49 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = {
checkbox(R.string.aggressive_recents, Prefs::aggressiveRecents, {
Prefs.aggressiveRecents = it
- setFrostResult(REQUEST_REFRESH)
+ shouldRefreshMain()
}) {
descRes = R.string.aggressive_recents_desc
}
checkbox(R.string.composer, Prefs::showComposer, {
Prefs.showComposer = it
- setFrostResult(REQUEST_REFRESH)
+ shouldRefreshMain()
}) {
descRes = R.string.composer_desc
}
+ checkbox(R.string.create_fab, Prefs::showCreateFab, {
+ Prefs.showCreateFab = it
+ setFrostResult(REQUEST_FAB)
+ }) {
+ descRes = R.string.create_fab_desc
+ }
+
checkbox(R.string.suggested_friends, Prefs::showSuggestedFriends, {
Prefs.showSuggestedFriends = it
- setFrostResult(REQUEST_REFRESH)
+ shouldRefreshMain()
}) {
descRes = R.string.suggested_friends_desc
}
checkbox(R.string.suggested_groups, Prefs::showSuggestedGroups, {
Prefs.showSuggestedGroups = it
- setFrostResult(REQUEST_REFRESH)
+ shouldRefreshMain()
}) {
descRes = R.string.suggested_groups_desc
}
checkbox(R.string.show_stories, Prefs::showStories, {
Prefs.showStories = it
- setFrostResult(REQUEST_REFRESH)
+ shouldRefreshMain()
}) {
descRes = R.string.show_stories_desc
}
checkbox(R.string.facebook_ads, Prefs::showFacebookAds, {
Prefs.showFacebookAds = it
- setFrostResult(REQUEST_REFRESH)
+ shouldRefreshMain()
}) {
descRes = R.string.facebook_ads_desc
}