mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 03:00:29 +03:00
Fixed redundant mod browser mod icons being cached
This commit is contained in:
@@ -2,7 +2,7 @@ package mindustry.mod;
|
||||
|
||||
/** Mod listing as a data class. */
|
||||
public class ModListing{
|
||||
public String repo, name, internalName, author, lastUpdated, description, minGameVersion, version;
|
||||
public String repo, name, internalName, author, lastUpdated, description, minGameVersion, version, iconHash = "";
|
||||
public boolean hasScripts, hasJava, iosCompatible, legacyCompatible, hasIcon;
|
||||
public String[] contentTypes = {};
|
||||
public int stars;
|
||||
|
||||
@@ -249,7 +249,7 @@ public class ModBrowserDialog extends BaseDialog{
|
||||
if(mod.hasIcon){
|
||||
Fi cacheFolder = Vars.mobile ? Core.files.cache("modIconCache"): dataDirectory.child("modIconCache");
|
||||
cacheFolder.mkdirs();
|
||||
Fi cacheFile = cacheFolder.child(Strings.sanitizeFilename(mod.repo + mod.lastUpdated) + ".png");
|
||||
Fi cacheFile = cacheFolder.child(Strings.sanitizeFilename(mod.repo + "_" + mod.iconHash) + ".png");
|
||||
|
||||
if(!cacheFile.exists()){ //fetch from Github
|
||||
ConsT<HttpResponse, Exception> fetch = res -> {
|
||||
|
||||
Reference in New Issue
Block a user