This commit is contained in:
Milos Kozak 2023-08-09 16:52:10 +02:00
parent 1d0da2840a
commit 911c446190
3 changed files with 9 additions and 12 deletions

View file

@ -2,6 +2,7 @@
<dictionary name="project-dictionary"> <dictionary name="project-dictionary">
<words> <words>
<w>aaps</w> <w>aaps</w>
<w>aapsclient</w>
<w>abcdef</w> <w>abcdef</w>
<w>accu</w> <w>accu</w>
<w>acked</w> <w>acked</w>
@ -18,11 +19,13 @@
<w>bage</w> <w>bage</w>
<w>basaliob</w> <w>basaliob</w>
<w>basals</w> <w>basals</w>
<w>batt</w>
<w>bgcheck</w> <w>bgcheck</w>
<w>bgsource</w> <w>bgsource</w>
<w>boluscalc</w> <w>boluscalc</w>
<w>bolusing</w> <w>bolusing</w>
<w>boluswizard</w> <w>boluswizard</w>
<w>boyda</w>
<w>carb</w> <w>carb</w>
<w>carbratio</w> <w>carbratio</w>
<w>carbs</w> <w>carbs</w>
@ -67,6 +70,7 @@
<w>humalog</w> <w>humalog</w>
<w>iage</w> <w>iage</w>
<w>infinivocgm</w> <w>infinivocgm</w>
<w>instantiator</w>
<w>insulet</w> <w>insulet</w>
<w>intelligo</w> <w>intelligo</w>
<w>iobtotal</w> <w>iobtotal</w>
@ -78,6 +82,7 @@
<w>lyumjev</w> <w>lyumjev</w>
<w>mdtp</w> <w>mdtp</w>
<w>medtronic</w> <w>medtronic</w>
<w>medtrum</w>
<w>mgdl</w> <w>mgdl</w>
<w>miao</w> <w>miao</w>
<w>misformatted</w> <w>misformatted</w>
@ -99,6 +104,7 @@
<w>oref</w> <w>oref</w>
<w>otpauth</w> <w>otpauth</w>
<w>passcode</w> <w>passcode</w>
<w>pbage</w>
<w>pdus</w> <w>pdus</w>
<w>philoul</w> <w>philoul</w>
<w>poctech</w> <w>poctech</w>
@ -108,6 +114,7 @@
<w>pumpcontrol</w> <w>pumpcontrol</w>
<w>pumpdrivers</w> <w>pumpdrivers</w>
<w>quickwizard</w> <w>quickwizard</w>
<w>rawbg</w>
<w>readstatus</w> <w>readstatus</w>
<w>realduration</w> <w>realduration</w>
<w>refresheventsfromnightscout</w> <w>refresheventsfromnightscout</w>

View file

@ -83,7 +83,7 @@ class DetailedBolusInfoStorageImpl @Inject constructor(
private fun loadStore(): ArrayList<DetailedBolusInfo> { private fun loadStore(): ArrayList<DetailedBolusInfo> {
val jsonString = sp.getString(rh.gs(R.string.key_bolus_storage), "") val jsonString = sp.getString(rh.gs(R.string.key_bolus_storage), "")
return if (jsonString != null && jsonString.isNotEmpty()) { return if (jsonString.isNotEmpty()) {
val type = object : TypeToken<List<DetailedBolusInfo>>() {}.type val type = object : TypeToken<List<DetailedBolusInfo>>() {}.type
Gson().fromJson(jsonString, type) Gson().fromJson(jsonString, type)
} else { } else {

View file

@ -37,7 +37,7 @@ class MedtrumOverviewFragment : MedtrumBaseFragment<FragmentMedtrumOverviewBindi
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
binding.apply { binding.apply {
viewmodel = ViewModelProvider(this@MedtrumOverviewFragment, viewModelFactory).get(MedtrumOverviewViewModel::class.java) viewmodel = ViewModelProvider(this@MedtrumOverviewFragment, viewModelFactory)[MedtrumOverviewViewModel::class.java]
viewmodel?.apply { viewmodel?.apply {
eventHandler.observe(viewLifecycleOwner) { evt -> eventHandler.observe(viewLifecycleOwner) { evt ->
when (evt.peekContent()) { when (evt.peekContent()) {
@ -65,19 +65,9 @@ class MedtrumOverviewFragment : MedtrumBaseFragment<FragmentMedtrumOverviewBindi
} }
EventType.PROFILE_NOT_SET -> ToastUtils.infoToast(requireContext(), R.string.no_profile_selected) EventType.PROFILE_NOT_SET -> ToastUtils.infoToast(requireContext(), R.string.no_profile_selected)
else -> Unit
} }
} }
} }
} }
} }
override fun onPause() {
super.onPause()
}
override fun onResume() {
super.onResume()
}
} }