Networking optimized
This commit is contained in:
Pupil
2020-02-09 17:11:35 +09:00
parent 384e6c61b0
commit f6d9c7f550
14 changed files with 97 additions and 65 deletions

View File

@@ -49,7 +49,11 @@ class Pupil : MultiDexApplication() {
histories = Histories(File(ContextCompat.getDataDir(this), "histories.json"))
favorites = Histories(File(ContextCompat.getDataDir(this), "favorites.json"))
val download = preference.getString("dl_location", null)
val download = try {
preference.getString("dl_location", null)
} catch (e: Exception) {
preference.edit().remove("dl_location").apply()
}
if (download == null) {
val default = ContextCompat.getExternalFilesDirs(this, null)[0]