fix url test not working after refreshing
This commit is contained in:
1 file changed
+8
-4
@@ -142,7 +142,7 @@ class ProxyActivity : BaseActivity() {
|
||||
.filterIsInstance<ListProxy.ListProxyHeader>()
|
||||
.map { it.now }
|
||||
|
||||
val changed = if (listDataOldChanged.size != listDataChanged.size)
|
||||
val changed = (if (listDataOldChanged.size != listDataChanged.size)
|
||||
(0..listData.size).toList()
|
||||
else {
|
||||
listDataChanged.mapIndexed { index, i ->
|
||||
@@ -150,8 +150,12 @@ class ProxyActivity : BaseActivity() {
|
||||
emptyList()
|
||||
else
|
||||
listOf(listDataOldChanged[index], i)
|
||||
}.flatten()
|
||||
}
|
||||
}.flatten() + listData.withIndex().filter {
|
||||
it.value is ListProxy.ListProxyHeader
|
||||
}.map {
|
||||
it.index
|
||||
}
|
||||
}).toSet()
|
||||
|
||||
runOnUiThread {
|
||||
activity_proxies_swipe.isRefreshing = false
|
||||
@@ -159,7 +163,7 @@ class ProxyActivity : BaseActivity() {
|
||||
(activity_proxies_list.adapter!! as ProxyAdapter).apply {
|
||||
elements = listData
|
||||
|
||||
changed.toSet().forEach {
|
||||
changed.forEach {
|
||||
notifyItemChanged(it)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user