aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-04-18 18:30:03 -0700
committerGitHub <noreply@github.com>2021-04-18 18:30:03 -0700
commitbf55dbf9b46cd8826987ee6e556307e24f3d46cc (patch)
treeaaca512641e6e4503859c4cb97a29a9296669f9d /app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
parent88a5d17814ff9f7c44f79216510d405f057ae454 (diff)
parent997362de5aab00f8d258b6fe8a058a8b3e018694 (diff)
downloadfrost-bf55dbf9b46cd8826987ee6e556307e24f3d46cc.tar.gz
frost-bf55dbf9b46cd8826987ee6e556307e24f3d46cc.tar.bz2
frost-bf55dbf9b46cd8826987ee6e556307e24f3d46cc.zip
Merge pull request #1770 from AllanWang/hilt
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.kt99
1 files changed, 63 insertions, 36 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 f8d10437..914874a2 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
@@ -49,66 +49,93 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = {
textGetter = { string(FeedSort(it).textRes) }
}
- checkbox(R.string.aggressive_recents, prefs::aggressiveRecents, {
- prefs.aggressiveRecents = it
- shouldRefreshMain()
- }) {
+ 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
- shouldRefreshMain()
- }) {
+ 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
- setFrostResult(REQUEST_FAB)
- }) {
+ 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
- shouldRefreshMain()
- }) {
+ 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
- shouldRefreshMain()
- }) {
+ 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
- shouldRefreshMain()
- }) {
+ checkbox(
+ R.string.show_stories, prefs::showStories,
+ {
+ prefs.showStories = it
+ shouldRefreshMain()
+ }
+ ) {
descRes = R.string.show_stories_desc
}
- checkbox(R.string.show_post_actions, prefs::showPostActions, {
- prefs.showPostActions = it
- shouldRefreshMain()
- }) {
+ checkbox(
+ R.string.show_post_actions, prefs::showPostActions,
+ {
+ prefs.showPostActions = it
+ shouldRefreshMain()
+ }
+ ) {
descRes = R.string.show_post_actions_desc
}
- checkbox(R.string.show_post_reactions, prefs::showPostReactions, {
- prefs.showPostReactions = it
- shouldRefreshMain()
- }) {
+ checkbox(
+ R.string.show_post_reactions, prefs::showPostReactions,
+ {
+ prefs.showPostReactions = it
+ shouldRefreshMain()
+ }
+ ) {
descRes = R.string.show_post_reactions_desc
}
- checkbox(R.string.full_size_image, prefs::fullSizeImage, {
- prefs.fullSizeImage = it
- shouldRefreshMain()
- }) {
+ checkbox(
+ R.string.full_size_image, prefs::fullSizeImage,
+ {
+ prefs.fullSizeImage = it
+ shouldRefreshMain()
+ }
+ ) {
descRes = R.string.full_size_image_desc
}
}