This commit is contained in:
Pupil
2020-02-11 09:29:58 +09:00
parent c1a71b0db3
commit b5432cd0b4
3 changed files with 16 additions and 12 deletions

View File

@@ -45,6 +45,12 @@ class Pupil : MultiDexApplication() {
override fun onCreate() {
val preference = PreferenceManager.getDefaultSharedPreferences(this)
try {
PreferenceManager.getDefaultSharedPreferences(this).getInt("dl_location", 0)
} catch (e: Exception) {
preference.edit().remove("dl_location").apply()
}
histories = Histories(File(ContextCompat.getDataDir(this), "histories.json"))
favorites = Histories(File(ContextCompat.getDataDir(this), "favorites.json"))