1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 01:55:50 +01:00

Fix edge case where chart tabs were reset to single value on debug build

This commit is contained in:
José Rebelo 2024-11-24 21:33:36 +00:00
parent 1f109c8f8b
commit 4cf076b3fa

View File

@ -1853,8 +1853,12 @@ public class GBApplication extends Application {
}
final String newPrefValue;
if (!StringUtils.isBlank(chartsTabsValue) && !chartsTabsValue.contains("calories")) {
newPrefValue = chartsTabsValue + ",calories";
if (!StringUtils.isBlank(chartsTabsValue)) {
if (!chartsTabsValue.contains("calories")) {
newPrefValue = chartsTabsValue + ",calories";
} else {
newPrefValue = chartsTabsValue;
}
} else {
newPrefValue = "calories";
}