combov2: Use profileName in getJSONStatus()

The value of profileName comes from profileFunction.getProfileName(),
so using that function directly is redundant.

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
This commit is contained in:
Carlos Rafael Giani 2022-11-26 23:06:06 +01:00
parent 2d7b9b5d81
commit b2375d54c7

View file

@ -1135,13 +1135,7 @@ class ComboV2Plugin @Inject constructor (
"Cannot include base basal rate in JSON status " + "Cannot include base basal rate in JSON status " +
"since no basal profile is currently active" "since no basal profile is currently active"
) )
try { put("ActiveProfile", profileName)
// TODO: What about the profileName argument?
// Is it obsolete?
put("ActiveProfile", profileFunction.getProfileName())
} catch (e: Exception) {
aapsLogger.error("Unhandled exception", e)
}
when (val alert = lastComboAlert) { when (val alert = lastComboAlert) {
is AlertScreenContent.Warning -> is AlertScreenContent.Warning ->
put("WarningCode", alert.code) put("WarningCode", alert.code)