fix a glitch with deleting the default note

This commit is contained in:
tibbi 2018-11-07 14:01:26 +01:00
parent f26ea25a1e
commit 54fa5096ee
1 changed files with 7 additions and 0 deletions

View File

@ -128,6 +128,13 @@ class DBHelper private constructor(private val mContext: Context) : SQLiteOpenHe
cursor?.close()
}
if (notes.isEmpty()) {
val generalNote = mContext.resources.getString(R.string.general_note)
val note = Note(1, generalNote, "", TYPE_NOTE)
insertNote(note)
return arrayListOf(note)
}
return notes
}