forked from github/szkolny
[App] Change app-wide storage dir to Download subfolder.
This commit is contained in:
parent
5913707519
commit
b9aca981e5
@ -37,9 +37,7 @@ class AttachmentsView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
private val storageDir by lazy {
|
||||
val storageDir = Environment.getExternalStoragePublicDirectory("Szkolny.eu")
|
||||
storageDir.mkdirs()
|
||||
storageDir
|
||||
Utils.getStorageDir()
|
||||
}
|
||||
|
||||
fun init(arguments: Bundle, owner: Any) {
|
||||
|
@ -776,7 +776,8 @@ public class Utils {
|
||||
public static File getStorageDir() {
|
||||
if (storageDir != null)
|
||||
return storageDir;
|
||||
storageDir = Environment.getExternalStoragePublicDirectory("Szkolny.eu");
|
||||
storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
||||
storageDir = new File(storageDir, "Szkolny.eu");
|
||||
storageDir.mkdirs();
|
||||
return storageDir;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user