aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-06-04 14:33:24 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-06-04 14:33:24 +0000
commitc37cc1bed372c7d6b632bedafbb283d08ed6c0bc (patch)
tree37251d28fd3595474914d641fea44f2f9dcad01d /app/src/main/res
parente5d9f93e96a0876676a75e31ebea29e4071c580a (diff)
downloadinfinity-for-reddit-c37cc1bed372c7d6b632bedafbb283d08ed6c0bc.tar
infinity-for-reddit-c37cc1bed372c7d6b632bedafbb283d08ed6c0bc.tar.gz
infinity-for-reddit-c37cc1bed372c7d6b632bedafbb283d08ed6c0bc.tar.bz2
infinity-for-reddit-c37cc1bed372c7d6b632bedafbb283d08ed6c0bc.tar.lz
infinity-for-reddit-c37cc1bed372c7d6b632bedafbb283d08ed6c0bc.tar.xz
infinity-for-reddit-c37cc1bed372c7d6b632bedafbb283d08ed6c0bc.tar.zst
infinity-for-reddit-c37cc1bed372c7d6b632bedafbb283d08ed6c0bc.zip
Add an option to disable autoplaying nsfw videos. Support imgur gifv videos.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/values/strings.xml3
-rw-r--r--app/src/main/res/xml/autoplay_preferences.xml18
-rw-r--r--app/src/main/res/xml/main_preferences.xml8
3 files changed, 23 insertions, 6 deletions
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5ffef9a6..fc088ae2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -320,6 +320,7 @@
<string name="settings_gestures_and_buttons_title">Gestures &amp; Buttons</string>
<string name="settings_open_link_in_app_title">Open Link In App</string>
<string name="settings_video_autoplay_title">Video Autoplay</string>
+ <string name="settings_autoplay_nsfw_videos_title">Autoplay NSFW Videos</string>
<string name="settings_immersive_interface_title">Immersive Interface</string>
<string name="settings_immersive_interface_ignore_nav_bar_title">Ignore Navigation Bar in Immersive Interface</string>
<string name="settings_immersive_interface_ignore_nav_bar_summary">Prevent the Bottom Navigation Bar Having Extra Padding</string>
@@ -738,5 +739,7 @@
<string name="fetching_video_info_please_wait">Fetching video info. Please wait.</string>
<string name="error_fetching_imgur_media">Cannot load images</string>
+ <!-- TODO: Remove or change this placeholder text -->
+ <string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
diff --git a/app/src/main/res/xml/autoplay_preferences.xml b/app/src/main/res/xml/autoplay_preferences.xml
new file mode 100644
index 00000000..6cb07dd9
--- /dev/null
+++ b/app/src/main/res/xml/autoplay_preferences.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+
+ <ListPreference
+ app:defaultValue="0"
+ android:entries="@array/settings_video_autoplay"
+ app:entryValues="@array/settings_video_autoplay_values"
+ app:key="video_autoplay"
+ app:title="@string/settings_video_autoplay_title"
+ app:useSimpleSummaryProvider="true" />
+
+ <SwitchPreference
+ app:defaultValue="true"
+ app:key="autoplay_nsfw_videos"
+ app:title="@string/settings_autoplay_nsfw_videos_title" />
+
+</PreferenceScreen> \ No newline at end of file
diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml
index 1074a90e..f332a49c 100644
--- a/app/src/main/res/xml/main_preferences.xml
+++ b/app/src/main/res/xml/main_preferences.xml
@@ -28,13 +28,9 @@
app:key="open_link_in_app"
app:title="@string/settings_open_link_in_app_title" />
- <ListPreference
- app:defaultValue="0"
- android:entries="@array/settings_video_autoplay"
- app:entryValues="@array/settings_video_autoplay_values"
- app:key="video_autoplay"
+ <Preference
app:title="@string/settings_video_autoplay_title"
- app:useSimpleSummaryProvider="true" />
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.AutoplayPreferenceFragment" />
<SwitchPreference
app:defaultValue="false"