Wizard: fix notes field

This commit is contained in:
Milos Kozak 2022-12-04 15:22:37 +01:00
parent 0c833d087b
commit 180d9327b6
2 changed files with 26 additions and 26 deletions

View file

@ -469,10 +469,6 @@
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>
<androidx.preference.PreferenceScreen
android:key="overview_advanced"
android:title="@string/advancedsettings_title">
<info.nightscout.core.validators.ValidatingEditTextPreference <info.nightscout.core.validators.ValidatingEditTextPreference
android:defaultValue="100" android:defaultValue="100"
android:dialogMessage="@string/deliverpartofboluswizard" android:dialogMessage="@string/deliverpartofboluswizard"
@ -492,18 +488,22 @@
android:summary="@string/enable_bolus_advisor_summary" android:summary="@string/enable_bolus_advisor_summary"
android:title="@string/enable_bolus_advisor" /> android:title="@string/enable_bolus_advisor" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_usesuperbolus"
android:summary="@string/enablesuperbolus_summary"
android:title="@string/enablesuperbolus" />
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="@string/key_usebolusreminder" android:key="@string/key_usebolusreminder"
android:summary="@string/enablebolusreminder_summary" android:summary="@string/enablebolusreminder_summary"
android:title="@string/enablebolusreminder" /> android:title="@string/enablebolusreminder" />
<androidx.preference.PreferenceScreen
android:key="overview_advanced"
android:title="@string/advancedsettings_title">
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_usesuperbolus"
android:summary="@string/enablesuperbolus_summary"
android:title="@string/enablesuperbolus" />
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>
</PreferenceCategory> </PreferenceCategory>

View file

@ -129,7 +129,7 @@ class WizardDialog : DaggerDialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
this.arguments?.let { bundle -> this.arguments?.let { bundle ->
carbsPassedIntoWizard = bundle.getDouble("carbs_input") carbsPassedIntoWizard = bundle.getDouble("carbs_input")
notesPassedIntoWizard = bundle.getString("notes_input").toString() notesPassedIntoWizard = bundle.getString("notes_input") ?: ""
} }
dialog?.window?.requestFeature(Window.FEATURE_NO_TITLE) dialog?.window?.requestFeature(Window.FEATURE_NO_TITLE)