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 {
|
private val storageDir by lazy {
|
||||||
val storageDir = Environment.getExternalStoragePublicDirectory("Szkolny.eu")
|
Utils.getStorageDir()
|
||||||
storageDir.mkdirs()
|
|
||||||
storageDir
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun init(arguments: Bundle, owner: Any) {
|
fun init(arguments: Bundle, owner: Any) {
|
||||||
|
@ -776,7 +776,8 @@ public class Utils {
|
|||||||
public static File getStorageDir() {
|
public static File getStorageDir() {
|
||||||
if (storageDir != null)
|
if (storageDir != null)
|
||||||
return storageDir;
|
return storageDir;
|
||||||
storageDir = Environment.getExternalStoragePublicDirectory("Szkolny.eu");
|
storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
||||||
|
storageDir = new File(storageDir, "Szkolny.eu");
|
||||||
storageDir.mkdirs();
|
storageDir.mkdirs();
|
||||||
return storageDir;
|
return storageDir;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user