Skip to content

Commit 99fa40e

Browse files
committed
fixed flags
1 parent f85d32a commit 99fa40e

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ android {
3636
targetSdkVersion 30
3737

3838
versionCode 45
39-
versionName "2.9.16"
39+
versionName "2.9.17"
4040

4141
resValue "string", "app_version",
4242
"${defaultConfig.versionName}${versionNameSuffix ?: ""}"

app/src/main/java/com/lagradost/cloudstream3/ui/home/HomeFragment.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,8 @@ class HomeFragment : Fragment() {
229229
currentValidApis.addAll(0, validAPIs.subList(0, 2))
230230

231231
val names = currentValidApis.map { if(isMultiLang) "${getFlagFromIso(it.lang)?.plus(" ") ?: ""}${it.name}" else it.name }
232-
val index = names.indexOf(currentApiName)
232+
val index = currentValidApis.map { it.name }.indexOf(currentApiName)
233233
listView?.setItemChecked(index, true)
234-
arrayAdapter.notifyDataSetChanged()
235234
arrayAdapter.addAll(names)
236235
arrayAdapter.notifyDataSetChanged()
237236
}

app/src/main/java/com/lagradost/cloudstream3/ui/search/SearchFragment.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ class SearchFragment : Fragment() {
230230
it.lang
231231
)?.plus(" ") ?: ""
232232
}${it.name}" else it.name }
233-
234-
for ((index, api) in names.withIndex()) {
233+
for ((index, api) in currentValidApis.map { it.name }.withIndex()) {
235234
listView?.setItemChecked(index, currentSelectedApis.contains(api))
236235
}
237236

0 commit comments

Comments
 (0)