perf: improved obsolete item check

This commit is contained in:
Thibault Deckers 2021-09-10 12:00:38 +09:00
parent 9b9e295c22
commit c91cd87c28

View file

@ -82,7 +82,7 @@ class MediaStoreImageProvider : ImageProvider() {
}
check(context, IMAGE_CONTENT_URI)
check(context, VIDEO_CONTENT_URI)
return knownContentIds.filter { id: Int -> !foundContentIds.contains(id) }.toList()
return knownContentIds.subtract(foundContentIds).toList()
}
fun checkObsoletePaths(context: Context, knownPathById: Map<Int, String>): List<Int> {