From 795d50c6452bf7a1398462120aeb23f2005b6cd1 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 25 Sep 2022 10:10:24 +0200 Subject: [PATCH 1/2] sort instances --- .../com/github/libretube/ui/preferences/InstanceSettings.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/preferences/InstanceSettings.kt b/app/src/main/java/com/github/libretube/ui/preferences/InstanceSettings.kt index 7696e8fe1..0c34906fb 100644 --- a/app/src/main/java/com/github/libretube/ui/preferences/InstanceSettings.kt +++ b/app/src/main/java/com/github/libretube/ui/preferences/InstanceSettings.kt @@ -165,12 +165,14 @@ class InstanceSettings : BasePreferenceFragment() { // fetch official public instances val response = try { - RetrofitInstance.externalApi.getInstances() + RetrofitInstance.externalApi.getInstances().toMutableList() } catch (e: Exception) { e.printStackTrace() - emptyList() + mutableListOf() } + response.sortBy { it.name } + response.forEach { if (it.name != null && it.api_url != null) { instanceNames += it.name!! From 456dd68172c98777cb2cc60cb3e00fae3149b443 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 25 Sep 2022 10:13:19 +0200 Subject: [PATCH 2/2] add lenback support --- app/src/main/AndroidManifest.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e77abb8c6..a236cc653 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -52,7 +52,9 @@ android:windowSoftInputMode="adjustPan"> + + @@ -70,7 +72,9 @@ android:windowSoftInputMode="adjustPan"> + + @@ -88,7 +92,9 @@ android:windowSoftInputMode="adjustPan"> + + @@ -106,7 +112,9 @@ android:windowSoftInputMode="adjustPan"> + + @@ -142,7 +150,9 @@ android:windowSoftInputMode="adjustPan"> + + @@ -160,7 +170,9 @@ android:windowSoftInputMode="adjustPan"> + + @@ -178,7 +190,9 @@ android:windowSoftInputMode="adjustPan"> + +