aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/db
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/db')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt7
2 files changed, 2 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
index 1b90b1e3..68e7e3de 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
@@ -68,4 +68,4 @@ suspend fun CookieDao.selectById(id: Long) = dao { _selectById(id) }
suspend fun CookieDao.save(cookie: CookieEntity) = dao { _save(cookie) }
suspend fun CookieDao.save(cookies: List<CookieEntity>) = dao { _save(cookies) }
suspend fun CookieDao.deleteById(id: Long) = dao { _deleteById(id) }
-suspend fun CookieDao.currentCookie() = selectById(Prefs.get().userId)
+suspend fun CookieDao.currentCookie(prefs: Prefs) = selectById(prefs.userId)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
index e54daa69..9ceb05aa 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
@@ -22,6 +22,7 @@ import androidx.room.Room
import androidx.room.RoomDatabase
import com.pitchedapps.frost.BuildConfig
import org.koin.core.context.GlobalContext
+import org.koin.core.context.KoinContextHandler
import org.koin.dsl.module
interface FrostPrivateDao {
@@ -100,11 +101,5 @@ class FrostDatabase(
single { get<FrostDatabase>().notifDao() }
single { get<FrostDatabase>().genericDao() }
}
-
- /**
- * Get from koin
- * For the most part, you can retrieve directly from other koin components
- */
- fun get(): FrostDatabase = GlobalContext.get().koin.get()
}
}