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() {
|
private fun openFile() {
|
||||||
FilePickerDialog(this, curPath) {
|
FilePickerDialog(this, curPath) {
|
||||||
|
if (it.endsWith(".svg")) {
|
||||||
|
|
||||||
|
} else if (File(it).isImageSlow()) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
toast(R.string.invalid_file_format)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue