mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
show an error at deleting a folder exception, to see what is wrong there
This commit is contained in:
parent
8bbc498724
commit
f0736fe634
1 changed files with 7 additions and 1 deletions
|
@ -546,7 +546,13 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
val fileDirItems = folders.asSequence().filter { it.isDirectory }.map { FileDirItem(it.absolutePath, it.name, true) }.toMutableList() as ArrayList<FileDirItem>
|
||||
when {
|
||||
fileDirItems.isEmpty() -> return
|
||||
fileDirItems.size == 1 -> toast(String.format(getString(R.string.deleting_folder), fileDirItems.first().name))
|
||||
fileDirItems.size == 1 -> {
|
||||
try {
|
||||
toast(String.format(getString(R.string.deleting_folder), fileDirItems.first().name))
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
val baseString = if (config.useRecycleBin) R.plurals.moving_items_into_bin else R.plurals.delete_items
|
||||
val deletingItems = resources.getQuantityString(baseString, fileDirItems.size, fileDirItems.size)
|
||||
|
|
Loading…
Reference in a new issue