DetailedBolusInfoStorage: Add key_ prefix
This commit is contained in:
parent
863ad1d1ac
commit
9b95445fe6
2 changed files with 3 additions and 3 deletions
|
@ -78,11 +78,11 @@ class DetailedBolusInfoStorageImpl @Inject constructor(
|
||||||
lastTwoEntries = ArrayList(store.subList(store.size - 2, store.size))
|
lastTwoEntries = ArrayList(store.subList(store.size - 2, store.size))
|
||||||
}
|
}
|
||||||
val jsonString = Gson().toJson(lastTwoEntries)
|
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> {
|
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()) {
|
return if (jsonString != null && jsonString.isNotEmpty()) {
|
||||||
val type = object : TypeToken<List<DetailedBolusInfo>>() {}.type
|
val type = object : TypeToken<List<DetailedBolusInfo>>() {}.type
|
||||||
Gson().fromJson(jsonString, type)
|
Gson().fromJson(jsonString, type)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<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="bg_label">BG</string>
|
||||||
|
|
||||||
<string name="executing_right_now">Command is executed right now</string>
|
<string name="executing_right_now">Command is executed right now</string>
|
||||||
|
|
Loading…
Reference in a new issue