From 2862141418b911c4422e7d99ca857d9d548ddca1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 15 Jul 2018 20:06:45 +0200 Subject: [PATCH] clear the favorites or recycle bin at deleting its folder --- .../gallery/adapters/DirectoryAdapter.kt | 41 +++++++++++++++---- .../gallery/interfaces/MediumDao.kt | 3 ++ 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 761a06cce..912ef06ac 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -99,7 +99,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList renameDir() R.id.cab_pin -> pinFolders(true) R.id.cab_unpin -> pinFolders(false) - R.id.cab_empty_recycle_bin -> emptyRecycleBin() + R.id.cab_empty_recycle_bin -> tryEmptyRecycleBin(true) R.id.cab_empty_disable_recycle_bin -> emptyAndDisableRecycleBin() R.id.cab_hide -> toggleFoldersVisibility(true) R.id.cab_unhide -> toggleFoldersVisibility(false) @@ -218,11 +218,19 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList