We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3b1446 commit 386767bCopy full SHA for 386767b
app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt
@@ -610,12 +610,10 @@ class MainActivity : SimpleActivity() {
610
}
611
612
private fun addNoteFromUri(uri: Uri, filename: String? = null) {
613
- val noteTitle = if (filename?.isEmpty() == false) {
614
- filename
615
- } else if (uri.toString().startsWith("content://")) {
616
- getFilenameFromContentUri(uri) ?: getNewNoteTitle()
617
- } else {
618
- getNewNoteTitle()
+ val noteTitle = when {
+ filename?.isEmpty() == false -> filename
+ uri.toString().startsWith("content://") -> getFilenameFromContentUri(uri) ?: getNewNoteTitle()
+ else -> getNewNoteTitle()
619
620
621
val inputStream = contentResolver.openInputStream(uri)
0 commit comments