mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
adding a comment related to removing irrelevant cached files
This commit is contained in:
parent
a6057f7fe4
commit
c6640eaa9a
1 changed files with 1 additions and 0 deletions
|
@ -612,6 +612,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
try {
|
try {
|
||||||
gotMedia(newMedia, false)
|
gotMedia(newMedia, false)
|
||||||
|
|
||||||
|
// remove cached files that are no longer valid for whatever reason
|
||||||
val newPaths = newMedia.mapNotNull { it as? Medium }.map { it.path }
|
val newPaths = newMedia.mapNotNull { it as? Medium }.map { it.path }
|
||||||
oldMedia.mapNotNull { it as? Medium }.filter { !newPaths.contains(it.path) }.forEach {
|
oldMedia.mapNotNull { it as? Medium }.filter { !newPaths.contains(it.path) }.forEach {
|
||||||
if (mPath == FAVORITES && getDoesFilePathExist(it.path)) {
|
if (mPath == FAVORITES && getDoesFilePathExist(it.path)) {
|
||||||
|
|
Loading…
Reference in a new issue