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 " +
"since no basal profile is currently active"
)
try {
// TODO: What about the profileName argument?
// Is it obsolete?
put("ActiveProfile", profileFunction.getProfileName())
} catch (e: Exception) {
aapsLogger.error("Unhandled exception", e)
}
put("ActiveProfile", profileName)
when (val alert = lastComboAlert) {
is AlertScreenContent.Warning ->
put("WarningCode", alert.code)