aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-03-05 18:52:47 -0500
committerAllan Wang <me@allanwang.ca>2019-03-05 18:52:47 -0500
commit8841728780438444bf51f1a2c3b0d961e49908d2 (patch)
treed7d75bc0d0ad3a59f74db259e077e607678c9cb6
parente82b74a687f5b5bff6f7cc16e1ba504583a8db32 (diff)
downloadfrost-8841728780438444bf51f1a2c3b0d961e49908d2.tar.gz
frost-8841728780438444bf51f1a2c3b0d961e49908d2.tar.bz2
frost-8841728780438444bf51f1a2c3b0d961e49908d2.zip
Change dependencies and add back suspensions
-rw-r--r--app/build.gradle4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt8
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt8
3 files changed, 10 insertions, 10 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 4c22ab97..82f0c6b1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -258,8 +258,8 @@ dependencies {
implementation "com.sothree.slidinguppanel:library:${SLIDING_PANEL}"
implementation "androidx.room:room-coroutines:${ROOM}"
- implementation "android.arch.persistence.room:runtime:${ROOM}"
- kapt "android.arch.persistence.room:compiler:${ROOM}"
+ implementation "androidx.room:room-runtime:${ROOM}"
+ kapt "androidx.room:room-compiler:${ROOM}"
testImplementation "androidx.room:room-testing:${ROOM}"
}
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 0b8283fd..9deb57da 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
@@ -60,16 +60,16 @@ data class CookieEntity(
interface CookieDao {
@Query("SELECT * FROM cookies")
- fun selectAll(): List<CookieEntity>
+ suspend fun selectAll(): List<CookieEntity>
@Query("SELECT * FROM cookies WHERE id = :id")
- fun selectById(id: Long): CookieEntity?
+ suspend fun selectById(id: Long): CookieEntity?
@Insert(onConflict = OnConflictStrategy.REPLACE)
- fun insertCookie(cookie: CookieEntity)
+ suspend fun insertCookie(cookie: CookieEntity)
@Query("DELETE FROM cookies WHERE id = :id")
- fun deleteById(id: Long)
+ suspend fun deleteById(id: Long)
}
@Database(version = CookiesDb.VERSION)
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 4fc38ec9..ff64f5eb 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt
@@ -45,16 +45,16 @@ data class FbTabEntity(@androidx.room.PrimaryKey var position: Int, var tab: FbI
interface FbTabDao {
@Query("SELECT * FROM tabs ORDER BY position ASC")
- fun _selectAll(): List<FbTabEntity>
+ suspend fun _selectAll(): List<FbTabEntity>
@Query("DELETE FROM tabs")
- fun _deleteAll()
+ suspend fun _deleteAll()
@Insert(onConflict = OnConflictStrategy.REPLACE)
- fun _insertAll(items: List<FbTabEntity>)
+ suspend fun _insertAll(items: List<FbTabEntity>)
@Transaction
- fun _save(items: List<FbTabEntity>) {
+ suspend fun _save(items: List<FbTabEntity>) {
_deleteAll()
_insertAll(items)
}