mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
do not allow syncing checklist files with the note itself
This commit is contained in:
@ -349,9 +349,20 @@ class MainActivity : SimpleActivity() {
|
||||
private fun openFile() {
|
||||
FilePickerDialog(this, canAddShowHiddenButton = true) {
|
||||
openFile(it, true) {
|
||||
OpenFileDialog(this, it.path) {
|
||||
addNewNote(it)
|
||||
}
|
||||
Thread {
|
||||
val fileText = it.readText().trim()
|
||||
val checklistItems = fileText.parseChecklistItems()
|
||||
if (checklistItems != null) {
|
||||
val note = Note(null, it.absolutePath.getFilenameFromPath(), fileText, TYPE_CHECKLIST)
|
||||
addNewNote(note)
|
||||
} else {
|
||||
runOnUiThread {
|
||||
OpenFileDialog(this, it.path) {
|
||||
addNewNote(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user