aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-09-12 00:19:46 -0400
committerGitHub <noreply@github.com>2017-09-12 00:19:46 -0400
commit2e98f5b32c565dbb8e29f40af4b5b7f2ab978ef0 (patch)
treea8e5c652a2d87ba9192a2245af2c8895a9022e3b /app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
parentcfa645abd84a7dc356e2e158145b039303cd919e (diff)
downloadfrost-2e98f5b32c565dbb8e29f40af4b5b7f2ab978ef0.tar.gz
frost-2e98f5b32c565dbb8e29f40af4b5b7f2ab978ef0.tar.bz2
frost-2e98f5b32c565dbb8e29f40af4b5b7f2ab978ef0.zip
Enhancement/link to autoplay (#271)
* Add link to autoplay * Update changelog * Update network strings
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.kt12
1 files changed, 8 insertions, 4 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 1487c969..cfc2bb6f 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt
@@ -7,6 +7,7 @@ import com.pitchedapps.frost.activities.MainActivity
import com.pitchedapps.frost.activities.SettingsActivity
import com.pitchedapps.frost.enums.FeedSort
import com.pitchedapps.frost.utils.Prefs
+import com.pitchedapps.frost.utils.launchWebOverlay
import com.pitchedapps.frost.utils.materialDialogThemed
/**
@@ -16,13 +17,11 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = {
text(R.string.newsfeed_sort, { Prefs.feedSort }, { Prefs.feedSort = it }) {
descRes = R.string.newsfeed_sort_desc
- onClick = {
- _, _, item ->
+ onClick = { _, _, item ->
materialDialogThemed {
title(R.string.newsfeed_sort)
items(FeedSort.values().map { string(it.textRes) })
- itemsCallbackSingleChoice(item.pref, {
- _, _, which, _ ->
+ itemsCallbackSingleChoice(item.pref, { _, _, which, _ ->
if (item.pref != which) {
item.pref = which
shouldRestartMain()
@@ -35,6 +34,11 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = {
textGetter = { string(FeedSort(it).textRes) }
}
+ plainText(R.string.autoplay_settings) {
+ descRes = R.string.autoplay_settings_desc
+ onClick = { _, _, _ -> launchWebOverlay("https://touch.facebook.com/settings/videos"); true }
+ }
+
header(R.string.pro_features)
checkbox(R.string.suggested_friends, { Prefs.showSuggestedFriends }, {