From 39a09a3ec1b62fe2c82bf1ad067515b1f974472b Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 5 Jun 2017 23:40:14 -0700 Subject: Remove eventbus bindings --- .../main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 6 +++--- .../com/pitchedapps/frost/web/FrostWebViewCore.kt | 17 ----------------- 2 files changed, 3 insertions(+), 20 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps') 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 -- cgit v1.2.3