mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-06-05 17:00:23 +02:00
moving more db related functions to Room
This commit is contained in:
@ -236,16 +236,16 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun handleUri(uri: Uri) {
|
||||
val id = dbHelper.getNoteId(uri.path)
|
||||
NotesHelper(this).getNoteIdWithPath(uri.path) {
|
||||
if (it != null && it > 0L) {
|
||||
updateSelectedNote(it)
|
||||
return@getNoteIdWithPath
|
||||
}
|
||||
|
||||
if (id > 0) {
|
||||
updateSelectedNote(id)
|
||||
return
|
||||
}
|
||||
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
if (it) {
|
||||
importFileWithSync(uri)
|
||||
handlePermission(PERMISSION_WRITE_STORAGE) {
|
||||
if (it) {
|
||||
importFileWithSync(uri)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user