diff options
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 6 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewCore.kt | 17 |
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 |