aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-05 23:40:14 -0700
committerAllan Wang <me@allanwang.ca>2017-06-05 23:40:14 -0700
commit39a09a3ec1b62fe2c82bf1ad067515b1f974472b (patch)
treec4c6019ccf54d662ea861191918087f09c4154dd
parent768e75c535623504f972603a89d1ac7d20cd48a0 (diff)
downloadfrost-39a09a3ec1b62fe2c82bf1ad067515b1f974472b.tar.gz
frost-39a09a3ec1b62fe2c82bf1ad067515b1f974472b.tar.bz2
frost-39a09a3ec1b62fe2c82bf1ad067515b1f974472b.zip
Remove eventbus bindings
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt17
2 files changed, 3 insertions, 20 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
index 8be4e278..a3233c4c 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt
@@ -1,13 +1,13 @@
package com.pitchedapps.frost.web
import android.webkit.JavascriptInterface
-import com.pitchedapps.frost.events.WebLaunchEvent
-import org.greenrobot.eventbus.EventBus
/**
* Created by Allan Wang on 2017-06-01.
*/
class FrostJSI {
@JavascriptInterface
- fun loadUrl(url: String) = EventBus.getDefault().post(WebLaunchEvent(url))
+ fun loadUrl(url: String){
+
+ }
} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
index e0fcb9b5..7e121b83 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt
@@ -12,15 +12,11 @@ import android.view.MotionEvent
import android.view.View
import android.view.animation.DecelerateInterpolator
import android.webkit.WebView
-import com.pitchedapps.frost.events.FbAccountEvent
import com.pitchedapps.frost.utils.L
import io.reactivex.Scheduler
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.subjects.BehaviorSubject
-import org.greenrobot.eventbus.EventBus
-import org.greenrobot.eventbus.Subscribe
-import org.greenrobot.eventbus.ThreadMode
/**
* Created by Allan Wang on 2017-05-29.
@@ -111,16 +107,6 @@ class FrostWebViewCore @JvmOverloads constructor(
return returnValue
}
- override fun onAttachedToWindow() {
- super.onAttachedToWindow()
- EventBus.getDefault().register(this);
- }
-
- override fun onDetachedFromWindow() {
- EventBus.getDefault().unregister(this)
- super.onDetachedFromWindow()
- }
-
/**
* If webview is already at the top, refresh
* Otherwise scroll to top
@@ -144,9 +130,6 @@ class FrostWebViewCore @JvmOverloads constructor(
}
}
- @Subscribe(threadMode = ThreadMode.MAIN)
- fun webEvent(event: FbAccountEvent) = event.execute(this)
-
// Nested Scroll implements
override fun setNestedScrollingEnabled(enabled: Boolean) {
childHelper.isNestedScrollingEnabled = enabled