Reload only if already loaded

pull/37/head
Varun Patil 2022-09-12 09:38:52 -07:00
parent 540b80f1e0
commit 7f60c60ebb
1 changed files with 4 additions and 1 deletions

View File

@ -364,12 +364,15 @@ export default {
delete row.pct; delete row.pct;
} }
// Force reload all loaded images
if ((i < this.currentStart || i > this.currentEnd) && row.photos) { if ((i < this.currentStart || i > this.currentEnd) && row.photos) {
for (const photo of row.photos) { for (const photo of row.photos) {
if (photo.flag & constants.FLAG_LOADED) {
photo.flag = (photo.flag & ~constants.FLAG_LOADED) | constants.FLAG_FORCE_RELOAD; photo.flag = (photo.flag & ~constants.FLAG_LOADED) | constants.FLAG_FORCE_RELOAD;
} }
} }
} }
}
// Make sure we don't do this too often // Make sure we don't do this too often
this.currentStart = startIndex; this.currentStart = startIndex;