From e874b788753ce69ea561b41dc13dfb230c750690 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Tue, 22 Jan 2019 23:42:39 -0500 Subject: Add back runOnUiThread --- .../main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt | 2 +- app/src/main/kotlin/com/pitchedapps/frost/views/FrostRecyclerView.kt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index 63da4f50..b4215913 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -516,7 +516,7 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, get() = supportFragmentManager.findFragmentByTag("android:switcher:${R.id.container}:${viewPager.currentItem}") as BaseFragment override fun reloadFragment(fragment: BaseFragment) { - adapter.reloadFragment(fragment) + runOnUiThread { adapter.reloadFragment(fragment) } } inner class SectionsPagerAdapter(val pages: List) : FragmentPagerAdapter(supportFragmentManager) { 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 9e0b70b2..b9fe69d1 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,8 @@ 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.coroutineScope import kotlinx.coroutines.launch import kotlinx.coroutines.supervisorScope @@ -83,7 +81,6 @@ class FrostRecyclerView @JvmOverloads constructor( recyclerContract.reload { parent.progressChannel.offer(it) } } } catch (e: Exception) { - } parent.progressChannel.offer(100) parent.refreshChannel.offer(false) -- cgit v1.2.3