Skip to content

Commit

Permalink
fix a glitch with deleting the default note
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbi committed Nov 7, 2018
1 parent f26ea25 commit 54fa509
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 54fa509

Please sign in to comment.