diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-09 18:26:59 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-09 18:26:59 +0100 |
commit | ec9ecb1af0570febc50e3571e1f5510090ae7974 (patch) | |
tree | 94f84e82c7e5a669c05c81dc85386dc796d76744 | |
parent | 95bb95fc89f8e3dc32c67b8a19c3f8ecf48057aa (diff) | |
download | AntennaPod-ec9ecb1af0570febc50e3571e1f5510090ae7974.zip |
More smark options
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java | 10 | ||||
-rw-r--r-- | core/src/main/res/values/arrays.xml | 3 |
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> |