ExtendedBolusDialog -> ui
This commit is contained in:
parent
9262943386
commit
6cb6d23c60
5 changed files with 11 additions and 12 deletions
|
@ -3,7 +3,6 @@ package info.nightscout.androidaps.di
|
|||
import dagger.Module
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
import info.nightscout.androidaps.activities.MyPreferenceFragment
|
||||
import info.nightscout.androidaps.dialogs.ExtendedBolusDialog
|
||||
import info.nightscout.androidaps.dialogs.FillDialog
|
||||
import info.nightscout.androidaps.dialogs.InsulinDialog
|
||||
import info.nightscout.androidaps.dialogs.LoopDialog
|
||||
|
@ -42,7 +41,6 @@ abstract class FragmentsModule {
|
|||
|
||||
@ContributesAndroidInjector abstract fun contributesEditQuickWizardDialog(): EditQuickWizardDialog
|
||||
|
||||
@ContributesAndroidInjector abstract fun contributesExtendedBolusDialog(): ExtendedBolusDialog
|
||||
@ContributesAndroidInjector abstract fun contributesFillDialog(): FillDialog
|
||||
@ContributesAndroidInjector abstract fun contributesInsulinDialog(): InsulinDialog
|
||||
@ContributesAndroidInjector abstract fun contributesLoopDialog(): LoopDialog
|
||||
|
|
|
@ -13,7 +13,7 @@ import dagger.android.support.DaggerFragment
|
|||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.activities.HistoryBrowseActivity
|
||||
import info.nightscout.androidaps.databinding.ActionsFragmentBinding
|
||||
import info.nightscout.androidaps.dialogs.ExtendedBolusDialog
|
||||
import info.nightscout.ui.dialogs.ExtendedBolusDialog
|
||||
import info.nightscout.androidaps.dialogs.FillDialog
|
||||
import info.nightscout.androidaps.dialogs.ProfileSwitchDialog
|
||||
import info.nightscout.androidaps.dialogs.TempBasalDialog
|
||||
|
|
|
@ -19,6 +19,7 @@ import info.nightscout.ui.activities.fragments.TreatmentsUserEntryFragment
|
|||
import info.nightscout.ui.dialogs.CalibrationDialog
|
||||
import info.nightscout.ui.dialogs.CarbsDialog
|
||||
import info.nightscout.ui.dialogs.CareDialog
|
||||
import info.nightscout.ui.dialogs.ExtendedBolusDialog
|
||||
import info.nightscout.ui.dialogs.ProfileViewerDialog
|
||||
import info.nightscout.ui.dialogs.WizardInfoDialog
|
||||
|
||||
|
@ -31,6 +32,7 @@ abstract class UiModule {
|
|||
@ContributesAndroidInjector abstract fun contributesCareDialog(): CareDialog
|
||||
@ContributesAndroidInjector abstract fun contributesWizardInfoDialog(): WizardInfoDialog
|
||||
@ContributesAndroidInjector abstract fun contributesProfileViewerDialog(): ProfileViewerDialog
|
||||
@ContributesAndroidInjector abstract fun contributesExtendedBolusDialog(): ExtendedBolusDialog
|
||||
|
||||
@ContributesAndroidInjector abstract fun contributesTDDStatsActivity(): TDDStatsActivity
|
||||
@ContributesAndroidInjector abstract fun contributeBolusProgressHelperActivity(): BolusProgressHelperActivity
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.dialogs
|
||||
package info.nightscout.ui.dialogs
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
|
@ -6,8 +6,7 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.google.common.base.Joiner
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.databinding.DialogExtendedbolusBinding
|
||||
import info.nightscout.androidaps.dialogs.DialogFragmentWithDate
|
||||
import info.nightscout.androidaps.extensions.formatColor
|
||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||
import info.nightscout.androidaps.interfaces.CommandQueue
|
||||
|
@ -16,9 +15,7 @@ import info.nightscout.androidaps.logging.UserEntryLogger
|
|||
import info.nightscout.androidaps.utils.ToastUtils
|
||||
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
|
||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck
|
||||
import info.nightscout.androidaps.utils.protection.ProtectionCheck.Protection.BOLUS
|
||||
import info.nightscout.database.entities.UserEntry.Action
|
||||
import info.nightscout.database.entities.UserEntry.Sources
|
||||
import info.nightscout.database.entities.UserEntry
|
||||
import info.nightscout.database.entities.ValueWithUnit
|
||||
import info.nightscout.interfaces.constraints.Constraint
|
||||
import info.nightscout.interfaces.queue.Callback
|
||||
|
@ -27,6 +24,8 @@ import info.nightscout.interfaces.utils.HtmlHelper
|
|||
import info.nightscout.rx.logging.LTag
|
||||
import info.nightscout.shared.SafeParse
|
||||
import info.nightscout.shared.interfaces.ResourceHelper
|
||||
import info.nightscout.ui.R
|
||||
import info.nightscout.ui.databinding.DialogExtendedbolusBinding
|
||||
import java.text.DecimalFormat
|
||||
import java.util.LinkedList
|
||||
import javax.inject.Inject
|
||||
|
@ -105,7 +104,7 @@ class ExtendedBolusDialog : DialogFragmentWithDate() {
|
|||
activity?.let { activity ->
|
||||
OKDialog.showConfirmation(activity, rh.gs(R.string.extended_bolus), HtmlHelper.fromHtml(Joiner.on("<br/>").join(actions)), {
|
||||
uel.log(
|
||||
Action.EXTENDED_BOLUS, Sources.ExtendedBolusDialog,
|
||||
UserEntry.Action.EXTENDED_BOLUS, UserEntry.Sources.ExtendedBolusDialog,
|
||||
ValueWithUnit.Insulin(insulinAfterConstraint),
|
||||
ValueWithUnit.Minute(durationInMinutes)
|
||||
)
|
||||
|
@ -132,8 +131,8 @@ class ExtendedBolusDialog : DialogFragmentWithDate() {
|
|||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue