Load images on request

This prevents loading the front and back images when scrolling through
the loyalty card list and should allow scaling to more images/files more
easily
This commit is contained in:
Sylvia van Os
2024-12-01 13:12:44 +01:00
parent 7fe67960bf
commit e0786594bc
11 changed files with 173 additions and 83 deletions

View File

@@ -335,7 +335,7 @@ public class DBHelper extends SQLiteOpenHelper {
LoyaltyCard card = LoyaltyCard.fromCursor(context, cardCursor);
for (ImageLocationType imageLocationType : ImageLocationType.values()) {
String name = Utils.getCardImageFileName(card.id, imageLocationType);
if (card.getImageForImageLocationType(imageLocationType) != null) {
if (card.getImageForImageLocationType(context, imageLocationType) != null) {
files.add(name);
}
}