image cache is cleared after downloading images. now you won't have to restart magarena if the image cache was set to 'missing image' for a card and you download it
parent
1335bd5ae1
commit
278594ff0a
|
@ -23,4 +23,5 @@ public interface CardImagesProvider {
|
|||
final int index,
|
||||
final boolean high);
|
||||
|
||||
void clearCache();
|
||||
}
|
||||
|
|
|
@ -71,4 +71,9 @@ public class HighQualityCardImagesProvider implements CardImagesProvider {
|
|||
public static CardImagesProvider getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public void clearCache() {
|
||||
origImages.clear();
|
||||
scaledImages.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,6 +172,9 @@ public class DownloadImagesDialog extends JDialog implements Runnable,ActionList
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
// clear images that are set to "missing image" in cache
|
||||
magic.data.HighQualityCardImagesProvider.getInstance().clearCache();
|
||||
|
||||
IconImages.reloadSymbols();
|
||||
|
||||
|
|
Loading…
Reference in New Issue