diff options
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.kt | 31 |
1 files changed, 15 insertions, 16 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 d1350df5..15a0633b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt @@ -23,7 +23,6 @@ import com.afollestad.materialdialogs.list.listItemsSingleChoice 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_FAB /** @@ -31,7 +30,7 @@ import com.pitchedapps.frost.utils.REQUEST_FAB */ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = { - text(R.string.newsfeed_sort, Prefs::feedSort, { Prefs.feedSort = it }) { + text(R.string.newsfeed_sort, prefs::feedSort, { prefs.feedSort = it }) { descRes = R.string.newsfeed_sort_desc onClick = { materialDialog { @@ -50,50 +49,50 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = { textGetter = { string(FeedSort(it).textRes) } } - checkbox(R.string.aggressive_recents, Prefs::aggressiveRecents, { - Prefs.aggressiveRecents = it + checkbox(R.string.aggressive_recents, prefs::aggressiveRecents, { + prefs.aggressiveRecents = it shouldRefreshMain() }) { descRes = R.string.aggressive_recents_desc } - checkbox(R.string.composer, Prefs::showComposer, { - Prefs.showComposer = it + checkbox(R.string.composer, prefs::showComposer, { + prefs.showComposer = it 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 + checkbox(R.string.suggested_friends, prefs::showSuggestedFriends, { + prefs.showSuggestedFriends = it shouldRefreshMain() }) { descRes = R.string.suggested_friends_desc } - checkbox(R.string.suggested_groups, Prefs::showSuggestedGroups, { - Prefs.showSuggestedGroups = it + checkbox(R.string.suggested_groups, prefs::showSuggestedGroups, { + prefs.showSuggestedGroups = it shouldRefreshMain() }) { descRes = R.string.suggested_groups_desc } - checkbox(R.string.show_stories, Prefs::showStories, { - Prefs.showStories = it + checkbox(R.string.show_stories, prefs::showStories, { + prefs.showStories = it shouldRefreshMain() }) { descRes = R.string.show_stories_desc } - checkbox(R.string.facebook_ads, Prefs::showFacebookAds, { - Prefs.showFacebookAds = it + checkbox(R.string.facebook_ads, prefs::showFacebookAds, { + prefs.showFacebookAds = it shouldRefreshMain() }) { descRes = R.string.facebook_ads_desc |