aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-01-05 00:11:15 -0500
committerAllan Wang <me@allanwang.ca>2019-01-05 00:11:15 -0500
commitc00aab03622a5045cf01b4b3883c7f7b835c841e (patch)
tree3e36a5872ac3e9d22e289f9432e17f6a920a0be8
parent495df6c84bb7a0daf8cea789f03396b6dabcdf2d (diff)
downloadfrost-c00aab03622a5045cf01b4b3883c7f7b835c841e.tar.gz
frost-c00aab03622a5045cf01b4b3883c7f7b835c841e.tar.bz2
frost-c00aab03622a5045cf01b4b3883c7f7b835c841e.zip
Remove remaining reactivex components
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt12
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/BaseActivity.kt38
2 files changed, 0 insertions, 50 deletions
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()