Issue 2: Add config #7

Merged
mathieu merged 4 commits from ms/issues-2/add-config-db into master 2020-04-25 20:37:13 +00:00
Showing only changes of commit d316ede233 - Show all commits

View File

@ -31,10 +31,10 @@ class ConfigDao(private val savePath: String) {
_config.value = Gson().fromJson(file.readText(Charsets.UTF_8), Config::class.java)
_config.value?.versionCode = BuildConfig.VERSION_CODE
_config.value?.versionName = BuildConfig.VERSION_NAME
save()
} else {
_config.value =
Config(BuildConfig.DB_VERSION, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE)
save()
}
}