From 7893ace9860a7bd5bbc8677b1162f0cd5601dad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Thu, 9 Jan 2025 18:08:15 +0000 Subject: [PATCH] Set default date of birth to 2000-01-01 --- .../freeyourgadget/gadgetbridge/model/ActivityUser.java | 2 +- .../freeyourgadget/gadgetbridge/util/XDatePreference.java | 6 +++--- app/src/main/res/xml/about_user.xml | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/ActivityUser.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/ActivityUser.java index c3e9e22e3..d8be6e6a6 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/ActivityUser.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/ActivityUser.java @@ -51,7 +51,7 @@ public class ActivityUser { private static final String defaultUserName = "gadgetbridge-user"; public static final int defaultUserGender = GENDER_FEMALE; - public static final String defaultUserDateOfBirth = "1970-01-01"; + public static final String defaultUserDateOfBirth = "2000-01-01"; public static final int defaultUserAge = 0; public static final int defaultUserHeightCm = 175; public static final int defaultUserWeightKg = 70; diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/XDatePreference.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/XDatePreference.java index 87217673d..0797ae148 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/XDatePreference.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/XDatePreference.java @@ -27,9 +27,9 @@ import java.util.Date; import java.util.Locale; public class XDatePreference extends DialogPreference { - private int year; - private int month; - private int day; + private int year = 1970; + private int month = 1; + private int day = 1; private long minDate; // TODO actually read minDate private long maxDate; // TODO actually read maxDate diff --git a/app/src/main/res/xml/about_user.xml b/app/src/main/res/xml/about_user.xml index 18c6d059e..07fa83411 100644 --- a/app/src/main/res/xml/about_user.xml +++ b/app/src/main/res/xml/about_user.xml @@ -15,6 +15,7 @@