mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-08 20:12:39 +01:00
Enhancement/link to autoplay (#271)
* Add link to autoplay * Update changelog * Update network strings
This commit is contained in:
parent
cfa645abd8
commit
2e98f5b32c
@ -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 }, {
|
||||
|
@ -10,7 +10,7 @@ import com.pitchedapps.frost.utils.Prefs
|
||||
*/
|
||||
fun SettingsActivity.getNetworkPrefs(): KPrefAdapterBuilder.() -> Unit = {
|
||||
|
||||
checkbox(R.string.network_media_on_metered, { Prefs.loadMediaOnMeteredNetwork }, { Prefs.loadMediaOnMeteredNetwork = it }) {
|
||||
checkbox(R.string.network_media_on_metered, { !Prefs.loadMediaOnMeteredNetwork }, { Prefs.loadMediaOnMeteredNetwork = !it }) {
|
||||
descRes = R.string.network_media_on_metered_desc
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
<string name="newsfeed_sort">Newsfeed Order</string>
|
||||
<string name="newsfeed_sort_desc">Defines the order in which the posts are shown</string>
|
||||
<string name="autoplay_settings">Video Autoplay Settings</string>
|
||||
<string name="autoplay_settings_desc">Enable/disable video autoplays on data or at all times.\nThese settings are independent of your settings for desktop.</string>
|
||||
<string name="pro_features">Pro Features</string>
|
||||
<string name="suggested_friends">Suggested Friends</string>
|
||||
<string name="suggested_friends_desc">Show "People You May Know" in the feed</string>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<resources>
|
||||
<string name="network_media_on_metered">Load images on metered network.</string>
|
||||
<string name="network_media_on_metered">Disable images on metered network.</string>
|
||||
<string name="network_media_on_metered_desc">If a metered network is detected, Frost will automatically stop all images and videos from loading.</string>
|
||||
</resources>
|
@ -13,7 +13,7 @@
|
||||
<version title="Beta Updates"/>
|
||||
<item text="Prevent image loading from trimming too many characters" />
|
||||
<item text="Fix most recent mode for news feed" />
|
||||
<item text="" />
|
||||
<item text="Add link to disable video autoplay in settings > newsfeed" />
|
||||
<item text="" />
|
||||
<item text="" />
|
||||
<item text="" />
|
||||
|
Loading…
Reference in New Issue
Block a user