diff --git a/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java b/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java index 25b54b23..a5ee1b69 100644 --- a/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java +++ b/app/src/main/java/com/simplemobiletools/filemanager/fragments/ItemsFragment.java @@ -476,7 +476,6 @@ public class ItemsFragment extends android.support.v4.app.Fragment } else { item.delete(); } - Utils.Companion.scanFile(getContext(), item); } private View.OnClickListener undoDeletion = new View.OnClickListener() { diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/RenameItemDialog.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/RenameItemDialog.kt index 9c186ec4..28391dce 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/RenameItemDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/RenameItemDialog.kt @@ -40,11 +40,11 @@ class RenameItemDialog(val context: Context, val path: String, val item: FileDir val document = context.getFileDocument(currFile.absolutePath, Config.newInstance(context).treeUri) if (document.canWrite()) document.renameTo(newName) - sendSuccess(currFile, newFile) + sendSuccess(newFile) dismiss() } else { if (currFile.renameTo(newFile)) { - sendSuccess(currFile, newFile) + sendSuccess(newFile) dismiss() } else { context.toast(R.string.error_occurred) @@ -57,8 +57,8 @@ class RenameItemDialog(val context: Context, val path: String, val item: FileDir } } - private fun sendSuccess(currFile: File, newFile: File) { - context.scanFiles(arrayListOf(currFile, newFile)) {} + private fun sendSuccess(newFile: File) { + context.scanFiles(arrayListOf(newFile)) {} listener.onSuccess() }