From c00aab03622a5045cf01b4b3883c7f7b835c841e Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 5 Jan 2019 00:11:15 -0500 Subject: Remove remaining reactivex components --- .../main/kotlin/com/pitchedapps/frost/FrostApp.kt | 12 ------- .../pitchedapps/frost/activities/BaseActivity.kt | 38 ---------------------- 2 files changed, 50 deletions(-) (limited to 'app') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt index 20ad46d9..5b62afad 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt @@ -44,9 +44,6 @@ import com.raizlabs.android.dbflow.config.DatabaseConfig import com.raizlabs.android.dbflow.config.FlowConfig import com.raizlabs.android.dbflow.config.FlowManager import com.raizlabs.android.dbflow.runtime.ContentResolverNotifier -import io.reactivex.exceptions.UndeliverableException -import io.reactivex.plugins.RxJavaPlugins -import java.net.SocketTimeoutException import java.util.Random import kotlin.reflect.KClass @@ -135,15 +132,6 @@ class FrostApp : Application() { L.d { "Activity ${activity.localClassName} created" } } }) - - RxJavaPlugins.setErrorHandler { - when (it) { - is SocketTimeoutException, is UndeliverableException -> - L.e { "RxJava common error ${it.message}" } - else -> - L.e(it) { "RxJava error" } - } - } } private fun initBugsnag() { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt index 5965e5cf..e514fa14 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt @@ -45,44 +45,6 @@ abstract class BaseActivity : KauBaseActivity() { if (this !is WebOverlayActivityBase) setFrostTheme() } - // -// private var networkDisposable: Disposable? = null -// private var networkConsumer: ((Connectivity) -> Unit)? = null -// -// fun setNetworkObserver(consumer: (connectivity: Connectivity) -> Unit) { -// this.networkConsumer = consumer -// } -// -// private fun observeNetworkConnectivity() { -// val consumer = networkConsumer ?: return -// networkDisposable = ReactiveNetwork.observeNetworkConnectivity(applicationContext) -// .subscribeOn(Schedulers.io()) -// .observeOn(AndroidSchedulers.mainThread()) -// .subscribe { connectivity: Connectivity -> -// connectivity.apply { -// L.d{"Network connectivity changed: isAvailable: $isAvailable isRoaming: $isRoaming"} -// consumer(connectivity) -// } -// } -// } -// -// private fun disposeNetworkConnectivity() { -// if (networkDisposable?.isDisposed == false) -// networkDisposable?.dispose() -// networkDisposable = null -// } -// -// override fun onResume() { -// super.onResume() -//// disposeNetworkConnectivity() -//// observeNetworkConnectivity() -// } -// -// override fun onPause() { -// super.onPause() -//// disposeNetworkConnectivity() -// } - override fun onStop() { if (this is VideoViewHolder) videoOnStop() super.onStop() -- cgit v1.2.3