mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
sort instances
This commit is contained in:
parent
3911c19a77
commit
795d50c645
@ -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!!
|
||||
|
Loading…
Reference in New Issue
Block a user