aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-04-18 18:30:03 -0700
committerGitHub <noreply@github.com>2021-04-18 18:30:03 -0700
commitbf55dbf9b46cd8826987ee6e556307e24f3d46cc (patch)
treeaaca512641e6e4503859c4cb97a29a9296669f9d /app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt
parent88a5d17814ff9f7c44f79216510d405f057ae454 (diff)
parent997362de5aab00f8d258b6fe8a058a8b3e018694 (diff)
downloadfrost-bf55dbf9b46cd8826987ee6e556307e24f3d46cc.tar.gz
frost-bf55dbf9b46cd8826987ee6e556307e24f3d46cc.tar.bz2
frost-bf55dbf9b46cd8826987ee6e556307e24f3d46cc.zip
Merge pull request #1770 from AllanWang/hilt
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt
index 3fe2cfd8..00df9743 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/FeedPrefs.kt
@@ -22,8 +22,7 @@ import com.pitchedapps.frost.BuildConfig
import com.pitchedapps.frost.enums.MainActivityLayout
import com.pitchedapps.frost.prefs.OldPrefs
import com.pitchedapps.frost.prefs.PrefsBase
-import org.koin.core.component.KoinComponent
-import org.koin.core.component.inject
+import javax.inject.Inject
interface FeedPrefs : PrefsBase {
var webTextScaling: Int
@@ -51,12 +50,10 @@ interface FeedPrefs : PrefsBase {
var showPostReactions: Boolean
}
-class FeedPrefsImpl(
- factory: KPrefFactory
-) : KPref("${BuildConfig.APPLICATION_ID}.prefs.feed", factory),
- FeedPrefs, KoinComponent {
-
- private val oldPrefs: OldPrefs by inject()
+class FeedPrefsImpl @Inject internal constructor(
+ factory: KPrefFactory,
+ oldPrefs: OldPrefs
+) : KPref("${BuildConfig.APPLICATION_ID}.prefs.feed", factory), FeedPrefs {
override var webTextScaling: Int by kpref("web_text_scaling", oldPrefs.webTextScaling /* 100 */)