Allow to set alarms to unused when long tapping

This helps clearing up a cluttered alarms list on devices like the Mi Band 4

Difference between disabling and setting to usused:
Unsused alarms cant be enabled from the Band, disabled can.

Closes #1747
This commit is contained in:
Andreas Shimokawa
2019-12-24 01:27:57 +01:00
parent 6e4240e61c
commit 21eada4caa
7 changed files with 74 additions and 18 deletions
@@ -15,8 +15,6 @@
*/
package nodomain.freeyourgadget.gadgetbridge.daogen;
import java.util.Date;
import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Index;
@@ -45,7 +43,7 @@ public class GBDaoGenerator {
public static void main(String[] args) throws Exception {
Schema schema = new Schema(21, MAIN_PACKAGE + ".entities");
Schema schema = new Schema(22, MAIN_PACKAGE + ".entities");
Entity userAttributes = addUserAttributes(schema);
Entity user = addUserInfo(schema, userAttributes);
@@ -378,6 +376,7 @@ public class GBDaoGenerator {
);
alarm.addIntProperty("hour").notNull();
alarm.addIntProperty("minute").notNull();
alarm.addBooleanProperty("unused").notNull();
alarm.addToOne(user, userId);
alarm.addToOne(device, deviceId);
}