[Mobile] Fix blinking card images while using online image fetcher

- also cache card list for faster lookup
This commit is contained in:
Anthony Calosa
2021-09-12 15:52:57 +08:00
parent 8149cbb507
commit 6f0ba03d24
7 changed files with 240 additions and 119 deletions

View File

@@ -126,6 +126,11 @@ public abstract class ImageFetcher {
if (destFile.exists()) {
// TODO: Figure out why this codepath gets reached.
// Ideally, fetchImage() wouldn't be called if we already have the image.
if (prefix.equals(ImageKeys.CARD_PREFIX)) {
PaperCard paperCard = ImageUtil.getPaperCardFromImageKey(imageKey);
if (paperCard != null)
paperCard.hasImage(true);
}
return;
}