WizardDialog -> ui

This commit is contained in:
Milos Kozak 2022-11-11 13:06:06 +01:00
parent 0f67f62384
commit e315afd9e0
18 changed files with 77 additions and 74 deletions

View file

@ -3,8 +3,8 @@ package info.nightscout.androidaps.di
import dagger.Module
import dagger.android.ContributesAndroidInjector
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus
import info.nightscout.androidaps.utils.wizard.BolusWizard
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
import info.nightscout.core.wizard.BolusWizard
import info.nightscout.core.wizard.QuickWizardEntry
@Module
@Suppress("unused")

View file

@ -4,7 +4,6 @@ import dagger.Module
import dagger.android.ContributesAndroidInjector
import info.nightscout.androidaps.activities.MyPreferenceFragment
import info.nightscout.androidaps.dialogs.NtpProgressDialog
import info.nightscout.androidaps.dialogs.WizardDialog
import info.nightscout.androidaps.plugins.aps.OpenAPSFragment
import info.nightscout.androidaps.plugins.aps.loop.LoopFragment
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderFragment
@ -16,6 +15,7 @@ import info.nightscout.androidaps.plugins.general.overview.OverviewFragment
import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWizardDialog
import info.nightscout.androidaps.plugins.general.wear.WearFragment
import info.nightscout.androidaps.utils.protection.PasswordCheck
import info.nightscout.ui.dialogs.WizardDialog
@Module
@Suppress("unused")

View file

@ -7,14 +7,14 @@ import androidx.annotation.RawRes
import androidx.fragment.app.FragmentManager
import info.nightscout.androidaps.MainActivity
import info.nightscout.androidaps.activities.SingleFragmentActivity
import info.nightscout.ui.dialogs.ProfileSwitchDialog
import info.nightscout.androidaps.dialogs.WizardDialog
import info.nightscout.androidaps.services.AlarmSoundService
import info.nightscout.interfaces.ui.ActivityNames
import info.nightscout.ui.activities.BolusProgressHelperActivity
import info.nightscout.ui.activities.ErrorHelperActivity
import info.nightscout.ui.activities.TDDStatsActivity
import info.nightscout.ui.dialogs.ProfileSwitchDialog
import info.nightscout.ui.dialogs.ProfileViewerDialog
import info.nightscout.ui.dialogs.WizardDialog
import javax.inject.Inject
class ActivityNamesImpl @Inject constructor() : ActivityNames {

View file

@ -30,7 +30,6 @@ import dagger.android.support.DaggerFragment
import info.nightscout.androidaps.R
import info.nightscout.androidaps.data.ProfileSealed
import info.nightscout.androidaps.databinding.OverviewFragmentBinding
import info.nightscout.androidaps.dialogs.WizardDialog
import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged
import info.nightscout.androidaps.events.EventNewBG
import info.nightscout.androidaps.events.EventPreferenceChange
@ -62,12 +61,12 @@ import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.androidaps.utils.protection.ProtectionCheck
import info.nightscout.androidaps.utils.ui.SingleClickButton
import info.nightscout.androidaps.utils.ui.UIRunnable
import info.nightscout.androidaps.utils.wizard.QuickWizard
import info.nightscout.automation.AutomationPlugin
import info.nightscout.core.fabric.FabricPrivacy
import info.nightscout.core.profile.toSignedUnitsString
import info.nightscout.core.profile.toTargetRangeString
import info.nightscout.core.profile.toUnits
import info.nightscout.core.wizard.QuickWizard
import info.nightscout.database.entities.UserEntry.Action
import info.nightscout.database.entities.UserEntry.Sources
import info.nightscout.database.entities.interfaces.end
@ -112,6 +111,7 @@ import info.nightscout.ui.dialogs.LoopDialog
import info.nightscout.ui.dialogs.ProfileSwitchDialog
import info.nightscout.ui.dialogs.TempTargetDialog
import info.nightscout.ui.dialogs.TreatmentDialog
import info.nightscout.ui.dialogs.WizardDialog
import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import java.util.Locale

View file

@ -22,9 +22,9 @@ import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWiza
import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange
import info.nightscout.androidaps.utils.ActionModeHelper
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.androidaps.utils.wizard.QuickWizard
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
import info.nightscout.core.fabric.FabricPrivacy
import info.nightscout.core.wizard.QuickWizard
import info.nightscout.core.wizard.QuickWizardEntry
import info.nightscout.interfaces.dragHelpers.ItemTouchHelperAdapter
import info.nightscout.interfaces.dragHelpers.OnStartDragListener
import info.nightscout.interfaces.dragHelpers.SimpleItemTouchHelperCallback

View file

@ -13,17 +13,17 @@ import dagger.android.support.DaggerDialogFragment
import info.nightscout.androidaps.R
import info.nightscout.androidaps.databinding.OverviewEditquickwizardDialogBinding
import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange
import info.nightscout.shared.utils.DateUtil
import info.nightscout.shared.utils.T
import info.nightscout.androidaps.utils.extensions.selectedItemPosition
import info.nightscout.androidaps.utils.extensions.setEnableForChildren
import info.nightscout.androidaps.utils.extensions.setSelection
import info.nightscout.androidaps.utils.wizard.QuickWizard
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
import info.nightscout.core.wizard.QuickWizard
import info.nightscout.core.wizard.QuickWizardEntry
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.shared.SafeParse
import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.shared.utils.DateUtil
import info.nightscout.shared.utils.T
import org.json.JSONException
import javax.inject.Inject

View file

@ -4,7 +4,6 @@ import android.app.NotificationManager
import android.content.Context
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
import info.nightscout.ui.dialogs.InsulinDialog
import info.nightscout.androidaps.extensions.convertedToAbsolute
import info.nightscout.androidaps.extensions.toStringShort
import info.nightscout.androidaps.extensions.total
@ -25,14 +24,14 @@ import info.nightscout.androidaps.services.AlarmSoundServiceHelper
import info.nightscout.androidaps.utils.DecimalFormatter
import info.nightscout.androidaps.utils.DefaultValueHelper
import info.nightscout.androidaps.utils.ToastUtils
import info.nightscout.androidaps.utils.wizard.BolusWizard
import info.nightscout.androidaps.utils.wizard.QuickWizard
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
import info.nightscout.core.fabric.FabricPrivacy
import info.nightscout.core.iob.round
import info.nightscout.core.profile.fromMgdlToUnits
import info.nightscout.core.profile.toMgdl
import info.nightscout.core.profile.toTargetRangeString
import info.nightscout.core.wizard.BolusWizard
import info.nightscout.core.wizard.QuickWizard
import info.nightscout.core.wizard.QuickWizardEntry
import info.nightscout.database.entities.Bolus
import info.nightscout.database.entities.GlucoseValue
import info.nightscout.database.entities.TemporaryBasal
@ -66,6 +65,7 @@ import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.shared.utils.DateUtil
import info.nightscout.shared.utils.T
import info.nightscout.ui.dialogs.CarbsDialog
import info.nightscout.ui.dialogs.InsulinDialog
import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import java.text.DateFormat

View file

@ -68,7 +68,6 @@
<string name="openapsma_profile_label">Profile</string>
<string name="openapsma_mealdata_label">Meal data</string>
<string name="result">Result</string>
<string name="result_insulin_carbs">Result: %1$s %2$s</string>
<string name="openapsma_noglucosedata">No glucose data available</string>
<string name="openapsma_request_label">Request</string>
<string name="delta">Delta</string>
@ -108,7 +107,6 @@
<string name="overview_tempbasal_button">TempBasal</string>
<string name="overview_extendedbolus_button">Extended Bolus</string>
<string name="configbuilder_nightscoutversion_label">Nightscout version:</string>
<string name="missing_carbs">Missing %1$d g</string>
<string name="exported">Preferences exported</string>
<string name="ue_exported">User Entries exported</string>
<string name="export_to">Export settings to</string>
@ -215,7 +213,6 @@
<string name="duration10h">10 hours</string>
<string name="restartingapp">Exiting application to apply settings.</string>
<string name="configbuilder_insulin_description">Which type of insulin are you using?</string>
<string name="key_usesuperbolus" translatable="false">key_usersuperbolus</string>
<string name="enablesuperbolus">Enable superbolus in wizard</string>
<string name="enablesuperbolus_summary">Enable superbolus functionality in wizard. Do not enable until you learn what it really does. IT MAY CAUSE INSULIN OVERDOSE IF USED BLINDLY!</string>
<string name="prediction_shortname">PRED</string>
@ -275,8 +272,6 @@
<string name="enablesmb_summary">Use Super Micro Boluses instead of temp basal for faster action</string>
<string name="enableuam_summary">Detection of Unannounced meals</string>
<string name="invalid">INVALID</string>
<string name="key_wizard_include_cob" translatable="false">wizard_include_cob</string>
<string name="key_wizard_include_trend_bg" translatable="false">wizard_include_trend_bg</string>
<string name="careportal_newnstreatment_percentage_label">Percentage</string>
<string name="default_temptargets">Default Temp-Targets</string>
<string name="eatingsoon_duration">eatingsoon duration</string>
@ -490,16 +485,9 @@
<string name="profile_total">== ∑ %1$s U</string>
<string name="key_smbmaxminutes" translatable="false">smbmaxminutes</string>
<string name="key_uamsmbmaxminutes" translatable="false">uamsmbmaxminutes</string>
<string name="twohours">2h</string>
<string name="cobvsiob">COB vs IOB</string>
<string name="slowabsorptiondetected"><![CDATA[<font color=\'%1$s\'>!!!!! Slow carbs absorption detected: %2$d%% of time. Double check your calculation. COB can be overestimated thus more insulin could be given !!!!!</font>]]></string>
<string name="key_boluswizard_percentage" translatable="false">boluswizard_percentage</string>
<string name="partialboluswizard">Deliver this part of bolus wizard result [%]</string>
<string name="deliverpartofboluswizard">Bolus wizard performs calculation but only this part of calculated insulin is delivered. Useful with SMB algorithm.</string>
<string name="increasingmaxbasal">Increasing max basal value because setting is lower than your max basal in profile</string>
<string name="unitsnosemicolon">Units</string>
<string name="key_wizard_calculation_visible" translatable="false">wizard_calculation_visible</string>
<string name="key_wizard_correction_percent" translatable="false">wizard_correction_percent</string>
<string name="objectives_button_unfinish">Clear finished</string>
<string name="objectives_button_unstart">Clear started</string>
<string name="doyouwantresetstart">Do you want reset objective start? You may lose your progress.</string>
@ -538,8 +526,6 @@
<string name="setupwizard_pump_riley_link_status">RileyLink status:</string>
<string name="copytolocalprofile_invalid">Unable to create profile. Profile is invalid.</string>
<string name="cta_dont_kill_my_app_info">Don\'t kill my app?</string>
<string name="advisoralarm">Run alarm when is time to eat</string>
<string name="key_usebolusadvisor" translatable="false">use_bolus_advisor</string>
<string name="time_to_eat">Time to eat!\nRun Bolus wizard and do calculation again.</string>
<string name="enablebolusreminder">Enable bolus reminder</string>
<string name="enablebolusreminder_summary">Use reminder to bolus later with wizard ("post-bolus")</string>
@ -562,8 +548,6 @@
<string name="identification_not_set">Identification not set in dev mode</string>
<string name="a11y_dialog">dialog</string>
<string name="a11y_current_bg">current blood glucose</string>
<string name="a11_correction_percentage">correct outcome with %</string>
<string name="a11_correction_units">correct outcome with units</string>
<string name="not_available_full">Not available</string>
<string name="a11y_graph">graph</string>
<string name="a11y_bg_quality">blood glucose quality</string>
@ -584,22 +568,6 @@
<string name="wizard_result">Calc. Wizard:\nInsulin: %1$.2fU\nCarbs: %2$dg</string>
<string name="overview_editquickwizard_show_on_device">Show entry on device:</string>
<string name="quick_wizard_not_available">Selected quickwizard no longer available, please refresh your tile</string>
<string name="wizard_no_actual_bg">No recent BG to base calculation on!</string>
<string name="wizard_no_active_profile">No active profile set!</string>
<string name="wizard_no_cob">Unknown COB! BG reading missing or recent app restart?</string>
<string name="wizard_carbs_constraint">Carb constraint violation!</string>
<string name="wizard_explain_calc">Calc (IC: %1$.1f, ISF: %2$.1f)</string>
<string name="wizard_explain_carbs">Carbs: %1$.2fU</string>
<string name="wizard_explain_cob">COB: %1$.0fg %2$.2fU</string>
<string name="wizard_explain_bg">BG: %1$.2fU</string>
<string name="wizard_explain_iob">IOB: %1$.2fU</string>
<string name="wizard_explain_superbolus">Superbolus: %1$.2fU</string>
<string name="wizard_explain_trend">15\' trend: %1$.2fU</string>
<string name="wizard_explain_percent">Percentage: %1$.2fU x %2$d%% ≈ %3$.2fU</string>
<string name="wizard_constraint_bolus_size">Insulin constraint violation!\nCannot deliver %1$.2fU</string>
<string name="wizard_explain_tt">TempT: %1$s</string>
<string name="wizard_explain_tt_to">%1$s to %2$s</string>
<string name="wizard_pump_not_available">No pump available!</string>
<string name="wear_unknown_action_string">Unknown action command:</string>
<string name="overview_editquickwizard_percentage">Percentage</string>
<string name="app_default">Application default</string>

View file

@ -6,8 +6,8 @@ import info.nightscout.androidaps.R
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.interfaces.Loop
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.utils.wizard.QuickWizard
import info.nightscout.androidaps.utils.wizard.QuickWizardEntry
import info.nightscout.core.wizard.QuickWizard
import info.nightscout.core.wizard.QuickWizardEntry
import info.nightscout.shared.sharedPreferences.SP
import org.json.JSONArray
import org.junit.Assert

View file

@ -12,6 +12,7 @@ import info.nightscout.androidaps.interfaces.Loop
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensDataStore
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
import info.nightscout.core.wizard.BolusWizard
import info.nightscout.interfaces.GlucoseUnit
import info.nightscout.interfaces.constraints.Constraint
import info.nightscout.interfaces.iob.IobTotal

View file

@ -1,10 +1,9 @@
package info.nightscout.androidaps.utils.wizard
package info.nightscout.core.wizard
import android.content.Context
import android.text.Spanned
import com.google.common.base.Joiner
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
import info.nightscout.androidaps.extensions.formatColor
import info.nightscout.androidaps.extensions.highValueToUnitsToString
import info.nightscout.androidaps.extensions.lowValueToUnitsToString
@ -19,6 +18,7 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.core.iob.round
import info.nightscout.core.main.R
import info.nightscout.core.profile.fromMgdlToUnits
import info.nightscout.core.profile.toMgdl
import info.nightscout.database.entities.BolusCalculatorResult

View file

@ -1,14 +1,13 @@
package info.nightscout.androidaps.utils.wizard
package info.nightscout.core.wizard
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
import info.nightscout.core.main.R
import info.nightscout.shared.sharedPreferences.SP
import org.json.JSONArray
import org.json.JSONObject
import java.util.*
import java.util.UUID
import javax.inject.Inject
import javax.inject.Singleton
import kotlin.collections.ArrayList
@Singleton
class QuickWizard @Inject constructor(

View file

@ -1,7 +1,6 @@
package info.nightscout.androidaps.utils.wizard
package info.nightscout.core.wizard
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
import info.nightscout.androidaps.annotations.OpenForTesting
import info.nightscout.androidaps.extensions.valueToUnits
import info.nightscout.androidaps.interfaces.IobCobCalculator
@ -9,6 +8,7 @@ import info.nightscout.androidaps.interfaces.Loop
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
import info.nightscout.core.iob.round
import info.nightscout.core.main.R
import info.nightscout.core.profile.secondsFromMidnight
import info.nightscout.database.entities.GlucoseValue
import info.nightscout.database.impl.AppRepository

View file

@ -96,6 +96,8 @@
<string name="key_objectiveusedisconnect" translatable="false">ObjectivesDisconnectUsed</string>
<string name="key_objectiveusereconnect" translatable="false">ObjectivesReconnectUsed</string>
<string name="key_aps_mode" translatable="false">aps_mode</string>
<string name="key_boluswizard_percentage" translatable="false">boluswizard_percentage</string>
<string name="key_usesuperbolus" translatable="false">key_usersuperbolus</string>
<!-- General-->
<string name="refresh">Refresh</string>
@ -668,6 +670,35 @@
<!-- SmsCommunicator -->
<string name="smscommunicator_missingsmspermission">Missing SMS permission</string>
<!-- BolusWizard -->
<string name="key_usebolusadvisor" translatable="false">use_bolus_advisor</string>
<string name="bolus_advisor">Bolus advisor</string>
<string name="bolus_advisor_message">You have high glycemia. Instead of eating now it\'s recommended to wait for better glycemia. Do you want to do a correction bolus now and remind you when it\'s time to eat? In this case no carbs will be recorded and you must use wizard again when we remind you.</string>
<string name="cobvsiob">COB vs IOB</string>
<string name="slowabsorptiondetected"><![CDATA[<font color=\'%1$s\'>!!!!! Slow carbs absorption detected: %2$d%% of time. Double check your calculation. COB can be overestimated thus more insulin could be given !!!!!</font>]]></string>
<string name="partialboluswizard">Deliver this part of bolus wizard result [%]</string>
<string name="bolus_constraint_applied_warn">Bolus constraint applied: %1$.2f U to %2$.2f U</string>
<string name="bolus_recorded_only">Bolus will be recorded only (not delivered by pump)</string>
<string name="advisoralarm">Run alarm when is time to eat</string>
<string name="no_action_selected">No action selected, nothing will happen</string>
<string name="wizard_no_actual_bg">No recent BG to base calculation on!</string>
<string name="wizard_no_active_profile">No active profile set!</string>
<string name="wizard_no_cob">Unknown COB! BG reading missing or recent app restart?</string>
<string name="wizard_carbs_constraint">Carb constraint violation!</string>
<string name="wizard_explain_calc">Calc (IC: %1$.1f, ISF: %2$.1f)</string>
<string name="wizard_explain_carbs">Carbs: %1$.2fU</string>
<string name="wizard_explain_cob">COB: %1$.0fg %2$.2fU</string>
<string name="wizard_explain_bg">BG: %1$.2fU</string>
<string name="wizard_explain_iob">IOB: %1$.2fU</string>
<string name="wizard_explain_superbolus">Superbolus: %1$.2fU</string>
<string name="wizard_explain_trend">15\' trend: %1$.2fU</string>
<string name="wizard_explain_percent">Percentage: %1$.2fU x %2$d%% ≈ %3$.2fU</string>
<string name="wizard_constraint_bolus_size">Insulin constraint violation!\nCannot deliver %1$.2fU</string>
<string name="wizard_explain_tt">TempT: %1$s</string>
<string name="wizard_explain_tt_to">%1$s to %2$s</string>
<string name="wizard_pump_not_available">No pump available!</string>
<plurals name="days">
<item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item>

View file

@ -9,8 +9,6 @@
<string name="time_to_eat">Time to eat</string>
<string name="enable_bolus_advisor">Enable bolus advisor</string>
<string name="enable_bolus_advisor_summary">Use reminder to start eating later instead of wizard result during high glycemia ("pre-bolus")</string>
<string name="bolus_advisor">Bolus advisor</string>
<string name="bolus_advisor_message">You have high glycemia. Instead of eating now it\'s recommended to wait for better glycemia. Do you want to do a correction bolus now and remind you when it\'s time to eat? In this case no carbs will be recorded and you must use wizard again when we remind you.</string>
<string name="time_to_bolus">Time to bolus!\nRun Bolus wizard and do calculation again.</string>
<string name="executing_right_now">Command is executed right now</string>
<string name="basal_value_below_minimum">Basal value below minimum. Profile not set!</string>

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.dialogs
package info.nightscout.ui.dialogs
import android.annotation.SuppressLint
import android.content.Context
@ -18,9 +18,7 @@ import android.widget.CompoundButton
import androidx.fragment.app.FragmentManager
import dagger.android.HasAndroidInjector
import dagger.android.support.DaggerDialogFragment
import info.nightscout.androidaps.R
import info.nightscout.androidaps.data.ProfileSealed
import info.nightscout.androidaps.databinding.DialogWizardBinding
import info.nightscout.androidaps.extensions.formatColor
import info.nightscout.androidaps.extensions.valueToUnits
import info.nightscout.androidaps.interfaces.ActivePlugin
@ -30,12 +28,11 @@ import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.utils.DecimalFormatter
import info.nightscout.androidaps.utils.ToastUtils
import info.nightscout.androidaps.utils.protection.ProtectionCheck
import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS
import info.nightscout.androidaps.utils.wizard.BolusWizard
import info.nightscout.core.fabric.FabricPrivacy
import info.nightscout.core.iob.round
import info.nightscout.core.profile.toMgdl
import info.nightscout.core.profile.toUnitsString
import info.nightscout.core.wizard.BolusWizard
import info.nightscout.database.impl.AppRepository
import info.nightscout.database.impl.ValueWrapper
import info.nightscout.interfaces.Constants
@ -55,6 +52,8 @@ import info.nightscout.shared.extensions.toVisibility
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.shared.utils.DateUtil
import info.nightscout.ui.R
import info.nightscout.ui.databinding.DialogWizardBinding
import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import java.text.DecimalFormat
@ -469,7 +468,7 @@ class WizardDialog : DaggerDialogFragment() {
binding.correctionInsulin.text = rh.gs(R.string.formatinsulinunits, wizard.insulinFromCorrection)
// Superbolus
binding.sb.text = if (binding.sbCheckbox.isChecked) rh.gs(R.string.twohours) else ""
binding.sb.text = if (binding.sbCheckbox.isChecked) rh.gs(R.string.two_hours) else ""
binding.sbInsulin.text = rh.gs(R.string.formatinsulinunits, wizard.insulinFromSuperBolus)
// Trend
@ -529,7 +528,7 @@ class WizardDialog : DaggerDialogFragment() {
ToastUtils.warnToast(ctx, R.string.dialog_canceled)
dismiss()
}
protectionCheck.queryProtection(activity, BOLUS, { queryingProtection = false }, cancelFail, cancelFail)
protectionCheck.queryProtection(activity, ProtectionCheck.Protection.BOLUS, { queryingProtection = false }, cancelFail, cancelFail)
}
}
}

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="no_action_selected">No action selected, nothing will happen</string>
<string name="constraint_applied">Constraint applied!</string>
<string name="bolus_constraint_applied">Bolus constraint applied</string>
<string name="carbs_constraint_applied">Carbs constraint applied</string>
@ -34,9 +33,6 @@
<string name="survey_comment">Note: Only data visible on this screen will be anonymously uploaded. ID is assigned to this installation of AAPS. You can submit data again if your main profile get changed but let it running at least for a week to make result visible in time in range. Your help is appreciated.</string>
<!-- Dialogs -->
<string name="bolus_constraint_applied_warn">Bolus constraint applied: %1$.2f U to %2$.2f U</string>
<string name="glucose_type">Glucose type</string>
<string name="bg_other">Other</string>
<string name="bg_meter">Meter</string>
@ -60,7 +56,6 @@
<!-- InsulinDialog -->
<string name="do_not_bolus_record_only">Do not bolus, record only</string>
<string name="bolus_recorded_only">Bolus will be recorded only (not delivered by pump)</string>
<!-- ProfileSwitchDialog -->
<string name="reuse_profile_pct_hours">Reuse %1$d%% %2$dh</string>
@ -80,6 +75,18 @@
<string name="resume">Resume</string>
<string name="reconnect">Reconnect Pump</string>
<!-- WizardDialog -->
<string name="key_wizard_calculation_visible" translatable="false">wizard_calculation_visible</string>
<string name="key_wizard_correction_percent" translatable="false">wizard_correction_percent</string>
<string name="key_wizard_include_cob" translatable="false">wizard_include_cob</string>
<string name="key_wizard_include_trend_bg" translatable="false">wizard_include_trend_bg</string>
<string name="a11_correction_percentage">correct outcome with %</string>
<string name="a11_correction_units">correct outcome with units</string>
<string name="two_hours">2h</string>
<string name="result_insulin_carbs">Result: %1$s %2$s</string>
<string name="missing_carbs">Missing %1$d g</string>
<!-- Treatments -->
<string name="no_records_available">No records available</string>
<string name="calculation_short">Calc</string>