From b93ab8973106f345bd4b2aa2c35283c95da60eb1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Jul 2018 11:36:00 +0200 Subject: [PATCH] add an extra check to remove the empty "Favorites" folder if necessary --- .../simplemobiletools/gallery/activities/MediaActivity.kt | 7 +++++++ 1 file changed, 7 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 e16f0bfc6..5dc69d41e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -572,6 +572,13 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { deleteDirectoryIfEmpty() deleteDBDirectory() } + + if (mPath == FAVORITES) { + Thread { + galleryDB.DirectoryDao().deleteDirPath(FAVORITES) + }.start() + } + finish() true } else {