summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fietz <Martin.Fietz@gmail.com>2016-01-16 14:11:33 +0100
committerMartin Fietz <Martin.Fietz@gmail.com>2016-01-16 14:11:33 +0100
commit6e40aa33ab3a77c122096a4bbd18a3d2fcb91a0d (patch)
tree5584c30854ef04684dad4cd175cbbd40104f738d
parentc3facdbb7a07046f1f75f8b1fdb94b2c0186bc2e (diff)
parentec9ecb1af0570febc50e3571e1f5510090ae7974 (diff)
downloadAntennaPod-6e40aa33ab3a77c122096a4bbd18a3d2fcb91a0d.zip
Merge pull request #1544 from mfietz/issue/1421-more-smark-options
More smark options
-rw-r--r--app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java10
-rw-r--r--core/src/main/res/values/arrays.xml3
2 files changed, 9 insertions, 4 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
index a872039f9..7afa38f36 100644
--- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
+++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java
@@ -503,15 +503,19 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
final Resources res = ui.getActivity().getResources();
ListPreference pref = (ListPreference) ui.findPreference(UserPreferences.PREF_SMART_MARK_AS_PLAYED_SECS);
- String[] values = res.getStringArray(
- R.array.smart_mark_as_played_values);
+ String[] values = res.getStringArray(R.array.smart_mark_as_played_values);
String[] entries = new String[values.length];
for (int x = 0; x < values.length; x++) {
if(x == 0) {
entries[x] = res.getString(R.string.pref_smart_mark_as_played_disabled);
} else {
Integer v = Integer.parseInt(values[x]);
- entries[x] = res.getQuantityString(R.plurals.time_seconds_quantified, v, v);
+ if(v < 60) {
+ entries[x] = res.getQuantityString(R.plurals.time_seconds_quantified, v, v);
+ } else {
+ v /= 60;
+ entries[x] = res.getQuantityString(R.plurals.time_minutes_quantified, v, v);
+ }
}
}
pref.setEntries(entries);
diff --git a/core/src/main/res/values/arrays.xml b/core/src/main/res/values/arrays.xml
index 341a7e520..6e885c0bb 100644
--- a/core/src/main/res/values/arrays.xml
+++ b/core/src/main/res/values/arrays.xml
@@ -11,8 +11,9 @@
<item>0</item>
<item>15</item>
<item>30</item>
- <item>45</item>
<item>60</item>
+ <item>120</item>
+ <item>300</item>
</string-array>