mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-06-05 21:59:17 +02:00
check if the opened file is a proper type
This commit is contained in:
@ -108,7 +108,13 @@ class MainActivity : SimpleActivity(), MyCanvas.PathsChangedListener {
|
||||
|
||||
private fun openFile() {
|
||||
FilePickerDialog(this, curPath) {
|
||||
if (it.endsWith(".svg")) {
|
||||
|
||||
} else if (File(it).isImageSlow()) {
|
||||
|
||||
} else {
|
||||
toast(R.string.invalid_file_format)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user