mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-09 12:43:36 -04:00
fix[version_list]: Move file to cache
This allows people to forcibly reset it to see newer version faster by clearing the cache. Plus if you don't have internet, having this isn't even important.
This commit is contained in:
parent
66db228605
commit
e2db0d35ed
@ -26,7 +26,7 @@ public class AsyncVersionList {
|
||||
|
||||
public void getVersionList(@Nullable VersionDoneListener listener, boolean secondPass){
|
||||
sExecutorService.execute(() -> {
|
||||
File versionFile = new File(Tools.DIR_DATA + "/version_list.json");
|
||||
File versionFile = new File(Tools.DIR_CACHE + "/version_list.json");
|
||||
JMinecraftVersionList versionList = null;
|
||||
try{
|
||||
if(!versionFile.exists() || (System.currentTimeMillis() > versionFile.lastModified() + 86400000 )){
|
||||
@ -68,7 +68,7 @@ public class AsyncVersionList {
|
||||
|
||||
// Then save the version list
|
||||
//TODO make it not save at times ?
|
||||
FileOutputStream fos = new FileOutputStream(Tools.DIR_DATA + "/version_list.json");
|
||||
FileOutputStream fos = new FileOutputStream(Tools.DIR_CACHE + "/version_list.json");
|
||||
fos.write(jsonString.getBytes());
|
||||
fos.close();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user