Compare commits

..

1 Commits

Author SHA1 Message Date
edaf6cb79d ci: Instrumentation tests coverage in ci.
All checks were successful
Check PR code / BuildAndTestAndCoverage (pull_request) Successful in 39m2s
2025-03-26 11:24:51 +01:00

View File

@ -12,7 +12,6 @@ import androidx.recyclerview.widget.RecyclerView
import bou.amine.apps.readerforselfossv2.android.R
import bou.amine.apps.readerforselfossv2.android.UpsertSourceActivity
import bou.amine.apps.readerforselfossv2.android.databinding.SourceListItemBinding
import bou.amine.apps.readerforselfossv2.android.testing.CountingIdlingResourceSingleton
import bou.amine.apps.readerforselfossv2.android.utils.glide.circularDrawable
import bou.amine.apps.readerforselfossv2.model.SelfossModel
import bou.amine.apps.readerforselfossv2.repository.Repository
@ -105,10 +104,8 @@ class SourcesListAdapter(
source: SelfossModel.SourceDetail,
position: Int,
) {
CountingIdlingResourceSingleton.increment()
CoroutineScope(Dispatchers.IO).launch {
val successfullyDeletedSource = repository.deleteSource(source.id, source.title)
CountingIdlingResourceSingleton.increment()
launch(Dispatchers.Main) {
if (successfullyDeletedSource) {
items.removeAt(position)
@ -122,9 +119,7 @@ class SourcesListAdapter(
Toast.LENGTH_SHORT,
).show()
}
CountingIdlingResourceSingleton.decrement()
}
CountingIdlingResourceSingleton.decrement()
}
}
}