From 2c20f85be14abfd45017b2b0f3a0f5d7c7886b90 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 17 Apr 2021 17:55:45 -0700 Subject: Injection checkpoint --- .../main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt index cf4f7456..dc375a8d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt @@ -34,25 +34,31 @@ import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.createFreshFile import com.pitchedapps.frost.utils.isFacebookUrl +import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import org.koin.core.component.KoinComponent -import org.koin.core.component.inject import java.io.File +import javax.inject.Inject /** * Created by Allan Wang on 2018-01-05. * * A barebone webview with a refresh listener */ +@AndroidEntryPoint class DebugWebView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : WebView(context, attrs, defStyleAttr), KoinComponent { - private val prefs: Prefs by inject() - private val themeProvider: ThemeProvider by inject() + @Inject + lateinit var prefs: Prefs + + @Inject + lateinit var themeProvider: ThemeProvider + var onPageFinished: (String?) -> Unit = {} init { -- cgit v1.2.3