From 1049669cb835b25ce8ab129cac4baf3bff2824be Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 5 Nov 2022 14:24:48 +0100 Subject: [PATCH 1/2] close #1704 again --- .../java/com/github/libretube/ui/fragments/HomeFragment.kt | 6 ------ app/src/main/res/layout/playlists_row.xml | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/HomeFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/HomeFragment.kt index 1c4975be7..a2c49b88a 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/HomeFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/HomeFragment.kt @@ -27,12 +27,6 @@ class HomeFragment : BaseFragment() { private lateinit var binding: FragmentHomeBinding private lateinit var region: String - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - arguments?.let { - } - } - override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, diff --git a/app/src/main/res/layout/playlists_row.xml b/app/src/main/res/layout/playlists_row.xml index 508499539..9157e09e0 100644 --- a/app/src/main/res/layout/playlists_row.xml +++ b/app/src/main/res/layout/playlists_row.xml @@ -51,8 +51,9 @@ android:layout_height="wrap_content" android:layout_below="@+id/video_count" android:layout_centerInParent="true" - android:layout_marginStart="5dp" - app:srcCompat="@drawable/ic_playlist" /> + android:paddingStart="5dp" + app:srcCompat="@drawable/ic_playlist" + tools:ignore="RtlSymmetry" /> From ab8422d8e88e96add58492aaf9fec9dd4c8452ff Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 5 Nov 2022 14:28:33 +0100 Subject: [PATCH 2/2] fix the region detector --- .../main/java/com/github/libretube/util/LocaleHelper.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/github/libretube/util/LocaleHelper.kt b/app/src/main/java/com/github/libretube/util/LocaleHelper.kt index c0c4778e5..dcc71810d 100644 --- a/app/src/main/java/com/github/libretube/util/LocaleHelper.kt +++ b/app/src/main/java/com/github/libretube/util/LocaleHelper.kt @@ -21,7 +21,7 @@ object LocaleHelper { ) updateLocaleConf(context, locale) } else { - val locale = Locale(languageName.toString()) + val locale = Locale(languageName) updateLocaleConf(context, locale) } } @@ -41,15 +41,15 @@ object LocaleHelper { fun getDetectedCountry(context: Context, defaultCountryIsoCode: String): String { detectSIMCountry(context)?.let { - return it + if (it != "") return it } detectNetworkCountry(context)?.let { - return it + if (it != "") return it } detectLocaleCountry(context)?.let { - return it + if (it != "") return it } return defaultCountryIsoCode