diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java index 282041260..9c67cfa73 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java @@ -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"; }