kotlin filter multiple conditions
for (i in dnsTestViewModel.msList.indices) {
Log.println(Log.ASSERT, "PS", "MS :"+ dnsTestViewModel.msList[i])
if(dnsTestViewModel.msList[i] != longm) {
for (j in 0 until dnsTestViewModel.msList.size - 1 - i) {
if (dnsTestViewModel.msList[j] > dnsTestViewModel.msList[j + 1] && dnsTestViewModel.msList[j] > 0 && dnsTestViewModel.msList[j + 1] > 0) {
val tempMs = dnsTestViewModel.msList[j]
val tempdns = dnsTestViewModel.tempdnsListFirst[j]
dnsTestViewModel.msList[j] = dnsTestViewModel.msList[j + 1]
dnsTestViewModel.tempdnsListFirst[j] =
dnsTestViewModel.tempdnsListFirst[j + 1]
dnsTestViewModel.msList[j + 1] = tempMs
dnsTestViewModel.tempdnsListFirst[j + 1] = tempdns
}
}
}
}