mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40:30 +05:30
commit
d852726ecf
@ -27,12 +27,6 @@ class HomeFragment : BaseFragment() {
|
|||||||
private lateinit var binding: FragmentHomeBinding
|
private lateinit var binding: FragmentHomeBinding
|
||||||
private lateinit var region: String
|
private lateinit var region: String
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
arguments?.let {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
|
@ -21,7 +21,7 @@ object LocaleHelper {
|
|||||||
)
|
)
|
||||||
updateLocaleConf(context, locale)
|
updateLocaleConf(context, locale)
|
||||||
} else {
|
} else {
|
||||||
val locale = Locale(languageName.toString())
|
val locale = Locale(languageName)
|
||||||
updateLocaleConf(context, locale)
|
updateLocaleConf(context, locale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -41,15 +41,15 @@ object LocaleHelper {
|
|||||||
|
|
||||||
fun getDetectedCountry(context: Context, defaultCountryIsoCode: String): String {
|
fun getDetectedCountry(context: Context, defaultCountryIsoCode: String): String {
|
||||||
detectSIMCountry(context)?.let {
|
detectSIMCountry(context)?.let {
|
||||||
return it
|
if (it != "") return it
|
||||||
}
|
}
|
||||||
|
|
||||||
detectNetworkCountry(context)?.let {
|
detectNetworkCountry(context)?.let {
|
||||||
return it
|
if (it != "") return it
|
||||||
}
|
}
|
||||||
|
|
||||||
detectLocaleCountry(context)?.let {
|
detectLocaleCountry(context)?.let {
|
||||||
return it
|
if (it != "") return it
|
||||||
}
|
}
|
||||||
|
|
||||||
return defaultCountryIsoCode
|
return defaultCountryIsoCode
|
||||||
|
@ -51,8 +51,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/video_count"
|
android:layout_below="@+id/video_count"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginStart="5dp"
|
android:paddingStart="5dp"
|
||||||
app:srcCompat="@drawable/ic_playlist" />
|
app:srcCompat="@drawable/ic_playlist"
|
||||||
|
tools:ignore="RtlSymmetry" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
Loading…
Reference in New Issue
Block a user