Browse Source

Fix IO thread performing UI task on some occasion (#59).

housekeeping/remove-warnings
Antoine POPINEAU 4 years ago
parent
commit
4b2cf10e78
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 4
      app/src/main/java/com/github/apognu/otter/fragments/FunkwhaleFragment.kt

4
app/src/main/java/com/github/apognu/otter/fragments/FunkwhaleFragment.kt

@ -101,7 +101,9 @@ abstract class FunkwhaleFragment<D : Any, A : FunkwhaleAdapter<D, *>> : Fragment @@ -101,7 +101,9 @@ abstract class FunkwhaleFragment<D : Any, A : FunkwhaleAdapter<D, *>> : Fragment
var first = size == 0
if (!moreLoading && upstreams == Repository.Origin.Network.origin) {
swiper?.isRefreshing = true
lifecycleScope.launch(Main) {
swiper?.isRefreshing = true
}
}
repository.fetch(upstreams, size).untilNetwork(lifecycleScope, IO) { data, isCache, page, hasMore ->

Loading…
Cancel
Save