diff options
author | Allan Wang <me@allanwang.ca> | 2019-03-07 04:00:20 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-03-07 04:00:20 -0500 |
commit | f1878133d8af686ce8c27acffe28f26e9dda5165 (patch) | |
tree | 5d0d31d0581cb23495eea84437bdf74272081e20 /app/src/main/kotlin/com/pitchedapps | |
parent | eabc8e3393cbd6b3dba5c70a5920075b8158d84e (diff) | |
download | frost-f1878133d8af686ce8c27acffe28f26e9dda5165.tar.gz frost-f1878133d8af686ce8c27acffe28f26e9dda5165.tar.bz2 frost-f1878133d8af686ce8c27acffe28f26e9dda5165.zip |
Add koin test
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps')
3 files changed, 4 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt index bd6bff4b..4d6bc938 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt @@ -53,4 +53,5 @@ interface CacheDao { suspend fun deleteById(id: Long) } -suspend fun CacheDao.save(id: String, contents: String) = insertCache(CacheEntity(id, System.currentTimeMillis(), contents))
\ No newline at end of file +suspend fun CacheDao.save(id: String, contents: String) = + insertCache(CacheEntity(id, System.currentTimeMillis(), contents))
\ No newline at end of file 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 b83fce52..29296494 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt @@ -71,6 +71,8 @@ class FrostDatabase(private val privateDb: FrostPrivateDatabase, private val pub single { create(context) } single { get<FrostDatabase>().cookieDao() } single { get<FrostDatabase>().tabDao() } + single { get<FrostDatabase>().cacheDao() } + single { get<FrostDatabase>().notifDao() } } /** diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt index c2bb0837..f4e74509 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt @@ -24,14 +24,9 @@ import androidx.room.Query import androidx.room.Transaction import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.defaultTabs -import com.pitchedapps.frost.utils.L import com.raizlabs.android.dbflow.annotation.Database import com.raizlabs.android.dbflow.annotation.PrimaryKey import com.raizlabs.android.dbflow.annotation.Table -import com.raizlabs.android.dbflow.kotlinextensions.database -import com.raizlabs.android.dbflow.kotlinextensions.fastSave -import com.raizlabs.android.dbflow.kotlinextensions.from -import com.raizlabs.android.dbflow.kotlinextensions.select import com.raizlabs.android.dbflow.structure.BaseModel import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext |