From cf716f901e70ab57aeb3dd9569e16953666686e7 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 27 Jun 2018 21:06:40 +0200 Subject: [PATCH] remove the Recycle Bin folder from the database right away at restoring all items --- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 7feb65b33..307fca91c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -444,6 +444,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { private fun restoreAllFiles() { val paths = mMedia.filter { it is Medium }.map { (it as Medium).path } as ArrayList restoreRecycleBinPaths(paths) { + Thread { + galleryDB.DirectoryDao().deleteDirPath(RECYCLE_BIN) + }.start() finish() } }