use better default file save path at Edit, if available

This commit is contained in:
tibbi 2018-04-14 21:58:26 +02:00
parent 093fe92596
commit c0d446a3a4

View file

@ -191,7 +191,8 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
if (newPath.isEmpty()) {
val filename = applicationContext.getFilenameFromContentUri(saveUri) ?: ""
if (filename.isNotEmpty()) {
newPath = "$internalStoragePath/$filename"
val path = if (intent.extras?.containsKey(REAL_FILE_PATH) == true) intent.getStringExtra(REAL_FILE_PATH).getParentPath() else internalStoragePath
newPath = "$path/$filename"
shouldAppendFilename = false
}
}