DetailedBolusInfoStorage: Add key_ prefix
This commit is contained in:
parent
863ad1d1ac
commit
9b95445fe6
|
@ -78,11 +78,11 @@ class DetailedBolusInfoStorageImpl @Inject constructor(
|
|||
lastTwoEntries = ArrayList(store.subList(store.size - 2, store.size))
|
||||
}
|
||||
val jsonString = Gson().toJson(lastTwoEntries)
|
||||
sp.putString(rh.gs(R.string.bolus_storage), jsonString)
|
||||
sp.putString(rh.gs(R.string.key_bolus_storage), jsonString)
|
||||
}
|
||||
|
||||
private fun loadStore(): ArrayList<DetailedBolusInfo> {
|
||||
val jsonString = sp.getString(rh.gs(R.string.bolus_storage), "")
|
||||
val jsonString = sp.getString(rh.gs(R.string.key_bolus_storage), "")
|
||||
return if (jsonString != null && jsonString.isNotEmpty()) {
|
||||
val type = object : TypeToken<List<DetailedBolusInfo>>() {}.type
|
||||
Gson().fromJson(jsonString, type)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="bolus_storage" translatable="false">bolus_storage</string>
|
||||
<string name="key_bolus_storage" translatable="false">key_bolus_storage</string>
|
||||
<string name="bg_label">BG</string>
|
||||
|
||||
<string name="executing_right_now">Command is executed right now</string>
|
||||
|
|
Loading…
Reference in a new issue