This commit is contained in:
Milos Kozak 2021-09-21 15:35:59 +02:00
parent 9e42f91848
commit ce59c3afd4
4 changed files with 5 additions and 5 deletions

View file

@ -156,7 +156,7 @@ class ActionsFragment : DaggerFragment() {
pbLevelLabel = view.findViewById(R.id.pb_level_label) pbLevelLabel = view.findViewById(R.id.pb_level_label)
profileSwitch?.setOnClickListener { profileSwitch?.setOnClickListener {
ProfileSwitchDialog().show(childFragmentManager, "Actions") ProfileSwitchDialog().show(childFragmentManager, "ProfileSwitchDialog")
} }
tempTarget?.setOnClickListener { tempTarget?.setOnClickListener {
TempTargetDialog().show(childFragmentManager, "Actions") TempTargetDialog().show(childFragmentManager, "Actions")

View file

@ -377,7 +377,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
} }
R.id.temp_target -> v.performClick() R.id.temp_target -> v.performClick()
R.id.active_profile -> activity?.let { activity -> protectionCheck.queryProtection(activity, ProtectionCheck.Protection.BOLUS, UIRunnable { ProfileSwitchDialog().show(childFragmentManager, "Overview") }) } R.id.active_profile -> activity?.let { activity -> protectionCheck.queryProtection(activity, ProtectionCheck.Protection.BOLUS, UIRunnable { ProfileSwitchDialog().show(childFragmentManager, "ProfileSwitchDialog") }) }
} }
return false return false

View file

@ -212,7 +212,7 @@ class LocalProfileFragment : DaggerFragment() {
binding.profileswitch.setOnClickListener { binding.profileswitch.setOnClickListener {
ProfileSwitchDialog() ProfileSwitchDialog()
.also { it.arguments = Bundle().also { bundle -> bundle.putInt("profileIndex", localProfilePlugin.currentProfileIndex) } } .also { it.arguments = Bundle().also { bundle -> bundle.putInt("profileIndex", localProfilePlugin.currentProfileIndex) } }
.show(childFragmentManager, "NewNSTreatmentDialog") .show(childFragmentManager, "ProfileSwitchDialog")
} }
binding.reset.setOnClickListener { binding.reset.setOnClickListener {
@ -259,7 +259,7 @@ class LocalProfileFragment : DaggerFragment() {
updateGUI() updateGUI()
} }
fun updateGUI() { private fun updateGUI() {
if (_binding == null) return if (_binding == null) return
val isValid = localProfilePlugin.isValidEditState() val isValid = localProfilePlugin.isValidEditState()
val isEdited = localProfilePlugin.isEdited val isEdited = localProfilePlugin.isEdited

View file

@ -267,7 +267,7 @@ class SWDefinition @Inject constructor(
.label(R.string.profileswitch_ismissing)) .label(R.string.profileswitch_ismissing))
.add(SWButton(injector) .add(SWButton(injector)
.text(R.string.doprofileswitch) .text(R.string.doprofileswitch)
.action { ProfileSwitchDialog().show(activity.supportFragmentManager, "SetupWizard") }) .action { ProfileSwitchDialog().show(activity.supportFragmentManager, "ProfileSwitchDialog") })
.validator { profileFunction.getProfile() != null } .validator { profileFunction.getProfile() != null }
.visibility { profileFunction.getProfile() == null } .visibility { profileFunction.getProfile() == null }
private val screenPump = SWScreen(injector, R.string.configbuilder_pump) private val screenPump = SWScreen(injector, R.string.configbuilder_pump)