mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
change the way new note types are determined, to a radio button
This commit is contained in:
@ -31,7 +31,7 @@ class NewNoteDialog(val activity: Activity, callback: (note: Note) -> Unit) {
|
||||
title.isEmpty() -> activity.toast(R.string.no_title)
|
||||
activity.notesDB.getNoteIdWithTitle(title) != null -> activity.toast(R.string.title_taken)
|
||||
else -> {
|
||||
val type = if (view.note_checklist.isChecked) TYPE_CHECKLIST else TYPE_TEXT
|
||||
val type = if (view.new_note_type.checkedRadioButtonId == view.type_checklist.id) TYPE_CHECKLIST else TYPE_TEXT
|
||||
val newNote = Note(null, title, "", type)
|
||||
callback(newNote)
|
||||
dismiss()
|
||||
|
Reference in New Issue
Block a user