preparing the migration to Room database

This commit is contained in:
tibbi
2018-11-07 12:18:52 +01:00
parent db6642ca9e
commit e7ff0c6e15
11 changed files with 118 additions and 13 deletions

View File

@ -170,17 +170,17 @@ class DBHelper private constructor(private val mContext: Context) : SQLiteOpenHe
fun updateNoteValue(note: Note) {
val values = ContentValues().apply { put(COL_VALUE, note.value) }
updateNote(note.id, values)
updateNote(note.id!!, values)
}
fun updateNoteTitle(note: Note) {
val values = ContentValues().apply { put(COL_TITLE, note.title) }
updateNote(note.id, values)
updateNote(note.id!!, values)
}
fun updateNotePath(note: Note) {
val values = ContentValues().apply { put(COL_PATH, note.path) }
updateNote(note.id, values)
updateNote(note.id!!, values)
}
private fun updateNote(id: Int, values: ContentValues) {