mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-16 20:10:37 +01:00
really clear all Favorites at deleting the given folder
This commit is contained in:
parent
7b1dfb7318
commit
9d2239d1c1
@ -555,6 +555,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
||||
tryEmptyRecycleBin(false)
|
||||
} else {
|
||||
ensureBackgroundThread {
|
||||
activity.mediaDB.clearFavorites()
|
||||
activity.favoritesDB.clearFavorites()
|
||||
listener?.refreshItems()
|
||||
}
|
||||
|
@ -42,6 +42,9 @@ interface MediumDao {
|
||||
@Query("UPDATE media SET date_taken = :dateTaken WHERE full_path = :path COLLATE NOCASE")
|
||||
fun updateFavoriteDateTaken(path: String, dateTaken: Long)
|
||||
|
||||
@Query("UPDATE media SET is_favorite = 0")
|
||||
fun clearFavorites()
|
||||
|
||||
@Query("DELETE FROM media WHERE deleted_ts != 0")
|
||||
fun clearRecycleBin()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user