diff options
author | Allan Wang <me@allanwang.ca> | 2021-04-17 17:55:45 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2021-04-17 17:55:45 -0700 |
commit | 2c20f85be14abfd45017b2b0f3a0f5d7c7886b90 (patch) | |
tree | c7278b37ad4fae7009dc1c167db97db98432866d /app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt | |
parent | d96d1d06a7c1581b97c042f2a74e7cd5b1c2546e (diff) | |
download | frost-2c20f85be14abfd45017b2b0f3a0f5d7c7886b90.tar.gz frost-2c20f85be14abfd45017b2b0f3a0f5d7c7886b90.tar.bz2 frost-2c20f85be14abfd45017b2b0f3a0f5d7c7886b90.zip |
Injection checkpoint
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt | 12 |
1 files changed, 9 insertions, 3 deletions
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 { |