adding a comment related to removing irrelevant cached files

This commit is contained in:
tibbi 2021-10-23 22:04:54 +02:00
parent a6057f7fe4
commit c6640eaa9a

View file

@ -612,6 +612,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
try {
gotMedia(newMedia, false)
// remove cached files that are no longer valid for whatever reason
val newPaths = newMedia.mapNotNull { it as? Medium }.map { it.path }
oldMedia.mapNotNull { it as? Medium }.filter { !newPaths.contains(it.path) }.forEach {
if (mPath == FAVORITES && getDoesFilePathExist(it.path)) {