mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
really clear all Favorites at deleting the given folder
This commit is contained in:
parent
7b1dfb7318
commit
9d2239d1c1
2 changed files with 4 additions and 0 deletions
|
@ -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…
Reference in a new issue