mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-03-06 04:17:45 +01:00
check if the opened file is a proper type
This commit is contained in:
parent
db79756667
commit
dab7102e61
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user