From ce59c3afd4c9eb2bc2db97e9fa98f03e1b1a2b94 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 21 Sep 2021 15:35:59 +0200 Subject: [PATCH] lints --- .../androidaps/plugins/general/actions/ActionsFragment.kt | 2 +- .../androidaps/plugins/general/overview/OverviewFragment.kt | 2 +- .../androidaps/plugins/profile/local/LocalProfileFragment.kt | 4 ++-- .../info/nightscout/androidaps/setupwizard/SWDefinition.kt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt index ada8f9eab0..3688f1a55f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt @@ -156,7 +156,7 @@ class ActionsFragment : DaggerFragment() { pbLevelLabel = view.findViewById(R.id.pb_level_label) profileSwitch?.setOnClickListener { - ProfileSwitchDialog().show(childFragmentManager, "Actions") + ProfileSwitchDialog().show(childFragmentManager, "ProfileSwitchDialog") } tempTarget?.setOnClickListener { TempTargetDialog().show(childFragmentManager, "Actions") diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt index 981881ffa3..9da0246b70 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.kt @@ -377,7 +377,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList } 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 diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/profile/local/LocalProfileFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/profile/local/LocalProfileFragment.kt index d166348713..989ef9dbdb 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/profile/local/LocalProfileFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/profile/local/LocalProfileFragment.kt @@ -212,7 +212,7 @@ class LocalProfileFragment : DaggerFragment() { binding.profileswitch.setOnClickListener { ProfileSwitchDialog() .also { it.arguments = Bundle().also { bundle -> bundle.putInt("profileIndex", localProfilePlugin.currentProfileIndex) } } - .show(childFragmentManager, "NewNSTreatmentDialog") + .show(childFragmentManager, "ProfileSwitchDialog") } binding.reset.setOnClickListener { @@ -259,7 +259,7 @@ class LocalProfileFragment : DaggerFragment() { updateGUI() } - fun updateGUI() { + private fun updateGUI() { if (_binding == null) return val isValid = localProfilePlugin.isValidEditState() val isEdited = localProfilePlugin.isEdited diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt index 8d640afc75..8b526b97bd 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.kt @@ -267,7 +267,7 @@ class SWDefinition @Inject constructor( .label(R.string.profileswitch_ismissing)) .add(SWButton(injector) .text(R.string.doprofileswitch) - .action { ProfileSwitchDialog().show(activity.supportFragmentManager, "SetupWizard") }) + .action { ProfileSwitchDialog().show(activity.supportFragmentManager, "ProfileSwitchDialog") }) .validator { profileFunction.getProfile() != null } .visibility { profileFunction.getProfile() == null } private val screenPump = SWScreen(injector, R.string.configbuilder_pump)