From 459359672b1f4266bc0f009c35f246fd90cce36a Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 2 Feb 2019 00:10:27 -0500 Subject: Fix crash --- .../kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt index b9fe69d1..ce7437a7 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt @@ -27,10 +27,11 @@ import com.pitchedapps.frost.contracts.FrostContentContainer import com.pitchedapps.frost.contracts.FrostContentCore import com.pitchedapps.frost.contracts.FrostContentParent import com.pitchedapps.frost.fragments.RecyclerContentContract +import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.isActive import kotlinx.coroutines.launch -import kotlinx.coroutines.supervisorScope /** * Created by Allan Wang on 2017-05-29. @@ -75,13 +76,7 @@ class FrostRecyclerView @JvmOverloads constructor( if (Prefs.animate) fadeOut(onFinish = onReloadClear) scope.launch { parent.refreshChannel.offer(true) - // TODO figure out how to avoid cancelling parent - try { - supervisorScope { - recyclerContract.reload { parent.progressChannel.offer(it) } - } - } catch (e: Exception) { - } + recyclerContract.reload { parent.progressChannel.offer(it) } parent.progressChannel.offer(100) parent.refreshChannel.offer(false) if (Prefs.animate) circularReveal() -- cgit v1.2.3