mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-24 17:10:33 +00:00
Round seek duration up instead of setting it to 10 seconds
This commit is contained in:
parent
288a61895c
commit
6a42714326
@ -82,8 +82,9 @@ public class VideoAudioSettingsFragment extends BasePreferenceFragment {
|
|||||||
final ListPreference durations = (ListPreference) findPreference(getString(R.string.seek_duration_key));
|
final ListPreference durations = (ListPreference) findPreference(getString(R.string.seek_duration_key));
|
||||||
durations.setEntryValues(displayedDurationValues.toArray(new CharSequence[0]));
|
durations.setEntryValues(displayedDurationValues.toArray(new CharSequence[0]));
|
||||||
durations.setEntries(displayedDescriptionValues.toArray(new CharSequence[0]));
|
durations.setEntries(displayedDescriptionValues.toArray(new CharSequence[0]));
|
||||||
if (Integer.parseInt(durations.getValue()) / 1000 % 10 == 5) {
|
final int selectedDuration = Integer.parseInt(durations.getValue());
|
||||||
durations.setValueIndex(0);
|
if (selectedDuration / 1000 % 10 == 5) {
|
||||||
|
durations.setValue(Integer.toString(selectedDuration + 5 * 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user