Skip to content
Snippets Groups Projects
Commit c0b78834 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Geoffrey Métais
Browse files

Fix NumberFormatException

parent d180d748
No related branches found
No related tags found
1 merge request!264Fixes for beta
...@@ -129,7 +129,12 @@ class PreferencesUi : BasePreferenceFragment(), SharedPreferences.OnSharedPrefer ...@@ -129,7 +129,12 @@ class PreferencesUi : BasePreferenceFragment(), SharedPreferences.OnSharedPrefer
(activity as PreferencesActivity).setRestart() (activity as PreferencesActivity).setRestart()
} }
"video_group_size" -> { "video_group_size" -> {
AbstractMedialibrary.getInstance().setVideoGroupsPrefixLength(Settings.getInstance(requireActivity()).getString(key, "6").toInt()) val goupSizeValue = try {
Settings.getInstance(requireActivity()).getString(key, "6").toInt()
} catch (e: NumberFormatException) {
6
}
AbstractMedialibrary.getInstance().setVideoGroupsPrefixLength(goupSizeValue)
(activity as PreferencesActivity).setRestart() (activity as PreferencesActivity).setRestart()
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment