Skip to content

Commit

Permalink
feat: Change extracted icon pack location to one in cache dir
Browse files Browse the repository at this point in the history
Firstly makes the Import Icon screen much faster on Android 11+ devices, due to changes to external storage. The cache directory also makes sense, as the icon pack can easily be extracted again if the user needs it again. In a nutshell, this also allows easy gain of storage space the extracted icon pack's using up.
  • Loading branch information
JavkhlanK committed Aug 25, 2022
1 parent 5915279 commit 8f1aec2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/a/a/a/wq.java
Expand Up @@ -3,6 +3,8 @@
import android.content.Context;
import android.os.Environment;

import com.besome.sketch.SketchApplication;

import java.io.File;

public class wq {
Expand Down Expand Up @@ -33,7 +35,6 @@ public class wq {
public static final String h = ".sketchware" + File.separator + "temp" + File.separator + "fonts";
public static final String i = ".sketchware" + File.separator + "temp" + File.separator + "proj";
public static final String j = ".sketchware" + File.separator + "temp" + File.separator + "data";
public static final String k = ".sketchware" + File.separator + "temp" + File.separator + "iconpack";
public static final String l = ".sketchware" + File.separator + "resources";
public static final String m = ".sketchware" + File.separator + "resources" + File.separator + "icons";
public static final String n = ".sketchware" + File.separator + "resources" + File.separator + "images";
Expand Down Expand Up @@ -237,7 +238,7 @@ public static String e(String sc_id) {
}

public static String getExtractedIconPackStoreLocation() {
return getAbsolutePathOf(k);
return new File(SketchApplication.getContext().getCacheDir(), "iconpack").getAbsolutePath();
}

public static String g() {
Expand Down

0 comments on commit 8f1aec2

Please sign in to comment.