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-04 23:58:07 -0700
committerAllan Wang <me@allanwang.ca>2019-08-04 23:58:07 -0700
commit1e582a31a92ac299db06f32e34be9f0ae6a5120b (patch)
treef44cc3e7a2b67daae5589acad05a573baea52255 /app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
parent392f394aec75f3c655b4f39d7640a8f6164cb109 (diff)
downloadfrost-1e582a31a92ac299db06f32e34be9f0ae6a5120b.tar.gz
frost-1e582a31a92ac299db06f32e34be9f0ae6a5120b.tar.bz2
frost-1e582a31a92ac299db06f32e34be9f0ae6a5120b.zip
Add fab auto refresh
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.kt19
1 files changed, 11 insertions, 8 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 cf7b3d09..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,46 +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 }) {
+ 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
}