mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
editing renameItemDialog style so its not that indented
This commit is contained in:
@ -27,7 +27,11 @@ class RenameItemDialog(val context: Context, val path: String, val item: FileDir
|
||||
show()
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener({
|
||||
val newName = view.item_name.value
|
||||
if (newName.isAValidFilename()) {
|
||||
if (!newName.isAValidFilename()) {
|
||||
context.toast(R.string.invalid_name)
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
val currFile = File(path, item.name)
|
||||
val newFile = File(path, newName)
|
||||
|
||||
@ -50,9 +54,6 @@ class RenameItemDialog(val context: Context, val path: String, val item: FileDir
|
||||
context.toast(R.string.error_occurred)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
context.toast(R.string.invalid_name)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user