Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
abfde46d54
|
@ -199,20 +199,20 @@ object APIHolder {
|
||||||
* but it turned out too complicated and unnecessary with extensions.
|
* but it turned out too complicated and unnecessary with extensions.
|
||||||
**/
|
**/
|
||||||
fun Context.getApiProviderLangSettings(): HashSet<String> {
|
fun Context.getApiProviderLangSettings(): HashSet<String> {
|
||||||
val langs = apis.map { it.lang }.toSet()
|
//val langs = apis.map { it.lang }.toSet()
|
||||||
.sortedBy { SubtitleHelper.fromTwoLettersToLanguage(it) }
|
//.sortedBy { SubtitleHelper.fromTwoLettersToLanguage(it) }
|
||||||
return langs.toHashSet()
|
//return langs.toHashSet()
|
||||||
|
|
||||||
// val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
|
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
// val hashSet = HashSet<String>()
|
val hashSet = HashSet<String>()
|
||||||
// hashSet.add("en") // def is only en
|
hashSet.add("en") // def is only en
|
||||||
// val list = settingsManager.getStringSet(
|
val list = settingsManager.getStringSet(
|
||||||
// this.getString(R.string.provider_lang_key),
|
this.getString(R.string.provider_lang_key),
|
||||||
// hashSet.toMutableSet()
|
hashSet.toMutableSet()
|
||||||
// )
|
)
|
||||||
//
|
|
||||||
// if (list.isNullOrEmpty()) return hashSet
|
if (list.isNullOrEmpty()) return hashSet
|
||||||
// return list.toHashSet()
|
return list.toHashSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.getApiTypeSettings(): HashSet<TvType> {
|
fun Context.getApiTypeSettings(): HashSet<TvType> {
|
||||||
|
|
|
@ -96,7 +96,7 @@ class SetupFragmentExtensions : Fragment() {
|
||||||
next_btt?.setOnClickListener {
|
next_btt?.setOnClickListener {
|
||||||
// Continue setup
|
// Continue setup
|
||||||
if (isSetup)
|
if (isSetup)
|
||||||
findNavController().navigate(R.id.action_navigation_setup_extensions_to_navigation_setup_media)
|
findNavController().navigate(R.id.action_navigation_setup_extensions_to_navigation_setup_provider_languages)
|
||||||
else
|
else
|
||||||
findNavController().navigate(R.id.navigation_home)
|
findNavController().navigate(R.id.navigation_home)
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ class SetupFragmentLanguage : Fragment() {
|
||||||
&& PluginManager.getPluginsLocal().isEmpty()
|
&& PluginManager.getPluginsLocal().isEmpty()
|
||||||
//&& PREBUILT_REPOSITORIES.isNotEmpty()
|
//&& PREBUILT_REPOSITORIES.isNotEmpty()
|
||||||
) R.id.action_navigation_global_to_navigation_setup_extensions
|
) R.id.action_navigation_global_to_navigation_setup_extensions
|
||||||
else R.id.action_navigation_setup_language_to_navigation_setup_media
|
else R.id.action_navigation_setup_language_to_navigation_setup_provider_languages
|
||||||
|
|
||||||
findNavController().navigate(
|
findNavController().navigate(
|
||||||
nextDestination,
|
nextDestination,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<Preference
|
<Preference
|
||||||
app:isPreferenceVisible="false"
|
app:isPreferenceVisible="true"
|
||||||
android:icon="@drawable/ic_baseline_language_24"
|
android:icon="@drawable/ic_baseline_language_24"
|
||||||
android:key="@string/provider_lang_key"
|
android:key="@string/provider_lang_key"
|
||||||
android:title="@string/provider_lang_settings" />
|
android:title="@string/provider_lang_settings" />
|
||||||
|
|
Loading…
Reference in New Issue