From d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 17 Apr 2021 17:49:18 -0700 Subject: Update theme providers and readd koin modules --- .../kotlin/com/pitchedapps/frost/settings/Feed.kt | 99 ++++++++++++++-------- 1 file changed, 63 insertions(+), 36 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt') 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 } } -- cgit v1.2.3