Compare commits
1 Commits
3b383d3d24
...
edaf6cb79d
Author | SHA1 | Date | |
---|---|---|---|
edaf6cb79d |
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user