aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt
diff options
context:
space:
mode:
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.kt17
1 files changed, 11 insertions, 6 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 fe85ab9c..187e7d4e 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,30 @@ 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 java.io.File
+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 {
+) : WebView(context, attrs, defStyleAttr) {
+
+ @Inject
+ lateinit var prefs: Prefs
+
+ @Inject
+ lateinit var themeProvider: ThemeProvider
- private val prefs: Prefs by inject()
- private val themeProvider: ThemeProvider by inject()
var onPageFinished: (String?) -> Unit = {}
init {