Fix loadLastRun
This commit is contained in:
parent
31d9c0ea50
commit
9be6424c25
1 changed files with 27 additions and 24 deletions
|
@ -351,6 +351,7 @@ class AutotunePlugin @Inject constructor(
|
|||
fun loadLastRun() {
|
||||
result = ""
|
||||
lastRunSuccess = false
|
||||
try {
|
||||
val json = JSONObject(sp.getString(R.string.key_autotune_last_run, ""))
|
||||
lastNbDays = JsonHelper.safeGetString(json, "lastNbDays", "")
|
||||
lastRun = JsonHelper.safeGetLong(json, "lastRun")
|
||||
|
@ -376,6 +377,8 @@ class AutotunePlugin @Inject constructor(
|
|||
result = JsonHelper.safeGetString(json, "result", "")
|
||||
updateButtonVisibility = JsonHelper.safeGetInt(json, "updateButtonVisibility")
|
||||
lastRunSuccess = true
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
fun calcDays(daysBack:Int): Int {
|
||||
|
|
Loading…
Reference in a new issue