From b6af7447e8105b8decd3e00ed8584b8b9edba136 Mon Sep 17 00:00:00 2001 From: ssuppe Date: Sat, 2 Dec 2023 23:09:49 +0000 Subject: [PATCH 1/2] In the profile editor, include profile name in the confirmation dialog (to make it clearer which profile you are deleting). --- plugins/main/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/main/src/main/res/values/strings.xml b/plugins/main/src/main/res/values/strings.xml index a46b55b81e..ced0a2cf96 100644 --- a/plugins/main/src/main/res/values/strings.xml +++ b/plugins/main/src/main/res/values/strings.xml @@ -149,7 +149,7 @@ add new to list Do you want to switch profile and discard changes made to current profile? Save or reset current changes first - Delete current profile? + Delete profile \"%1$s\"? Units: Missing profile name Error in IC values From 2a1ddc956f98e2767e8114f4868c319e6e488544 Mon Sep 17 00:00:00 2001 From: ssuppe Date: Sat, 2 Dec 2023 23:42:54 +0000 Subject: [PATCH 2/2] Added profile name to the actual code (not just the string). --- .../kotlin/app/aaps/plugins/main/profile/ProfileFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/profile/ProfileFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/profile/ProfileFragment.kt index 5eb7f3d41d..0415399cc4 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/profile/ProfileFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/profile/ProfileFragment.kt @@ -300,7 +300,7 @@ class ProfileFragment : DaggerFragment() { binding.profileRemove.setOnClickListener { activity?.let { activity -> - OKDialog.showConfirmation(activity, rh.gs(R.string.delete_current_profile), { + OKDialog.showConfirmation(activity, rh.gs(R.string.delete_current_profile, profilePlugin.currentProfile()?.name), { uel.log( UserEntry.Action.PROFILE_REMOVED, UserEntry.Sources.LocalProfile, ValueWithUnit.SimpleString( profilePlugin.currentProfile()?.name