mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Merge remote-tracking branch 'upstream/master' into black_whitelist_for_notifications
# Conflicts: # app/src/main/res/values/strings.xml
This commit is contained in:
@@ -349,6 +349,7 @@ public class GBDaoGenerator {
|
||||
|
||||
private static void addAlarms(Schema schema, Entity user, Entity device) {
|
||||
Entity alarm = addEntity(schema, "Alarm");
|
||||
alarm.implementsInterface("nodomain.freeyourgadget.gadgetbridge.model.Alarm");
|
||||
Property deviceId = alarm.addLongProperty("deviceId").notNull().getProperty();
|
||||
Property userId = alarm.addLongProperty("userId").notNull().getProperty();
|
||||
Property position = alarm.addIntProperty("position").notNull().getProperty();
|
||||
@@ -359,8 +360,11 @@ public class GBDaoGenerator {
|
||||
indexUnique.makeUnique();
|
||||
alarm.addIndex(indexUnique);
|
||||
alarm.addBooleanProperty("enabled").notNull();
|
||||
alarm.addBooleanProperty("smartAlarm").notNull();
|
||||
alarm.addIntProperty("repetition").notNull();
|
||||
alarm.addBooleanProperty("smartWakeup").notNull();
|
||||
alarm.addIntProperty("repetition").notNull().codeBeforeGetter(
|
||||
"public boolean isRepetitive() { return getRepetition() != ALARM_ONCE; } " +
|
||||
"public boolean getRepetition(int dow) { return (this.repetition & dow) > 0; }"
|
||||
);
|
||||
alarm.addIntProperty("hour").notNull();
|
||||
alarm.addIntProperty("minute").notNull();
|
||||
alarm.addToOne(user, userId);
|
||||
|
||||
Reference in New Issue
Block a user