diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/dbflow')
4 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt index 8c5806c8..ff46856c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/CookiesDb.kt @@ -21,7 +21,7 @@ import java.net.UnknownHostException * Created by Allan Wang on 2017-05-30. */ -@Database(name = CookiesDb.NAME, version = CookiesDb.VERSION) +@Database(version = CookiesDb.VERSION) object CookiesDb { const val NAME = "Cookies" const val VERSION = 2 diff --git a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/DbUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/DbUtils.kt index bb2627a5..f5c962ed 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/DbUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/DbUtils.kt @@ -17,8 +17,8 @@ object DbUtils { } -inline fun <reified T : Any> List<T>.replace(context: Context, dbName: String) { +inline fun <reified T : Any> List<T>.replace(dbName: String) { L.d("Replacing $dbName.db") - DbUtils.db(dbName).reset(context) + DbUtils.db(dbName).reset() FastStoreModelTransaction.saveBuilder(FlowManager.getModelAdapter(T::class.java)).addAll(this).build() }
\ No newline at end of file diff --git a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/FbTabsDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/FbTabsDb.kt index 4b2d3403..c68c9420 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/FbTabsDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/FbTabsDb.kt @@ -15,7 +15,7 @@ import com.raizlabs.android.dbflow.structure.BaseModel * Created by Allan Wang on 2017-05-30. */ -@Database(name = FbTabsDb.NAME, version = FbTabsDb.VERSION) +@Database( version = FbTabsDb.VERSION) object FbTabsDb { const val NAME = "FrostTabs" const val VERSION = 1 @@ -31,6 +31,6 @@ fun loadFbTabs(): List<FbItem> { return defaultTabs() } -fun List<FbItem>.saveAsync(c: Context) { - mapIndexed { index, fbTab -> FbTabModel(index, fbTab) }.replace(c, FbTabsDb.NAME) +fun List<FbItem>.saveAsync() { + mapIndexed { index, fbTab -> FbTabModel(index, fbTab) }.replace(FbTabsDb.NAME) }
\ No newline at end of file diff --git a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/NotificationDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/NotificationDb.kt index 66f5ae64..d3abb9a2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/dbflow/NotificationDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/dbflow/NotificationDb.kt @@ -11,7 +11,7 @@ import com.raizlabs.android.dbflow.structure.BaseModel * Created by Allan Wang on 2017-05-30. */ -@Database(name = NotificationDb.NAME, version = NotificationDb.VERSION) +@Database(version = NotificationDb.VERSION) object NotificationDb { const val NAME = "Notifications" const val VERSION = 2 |