Skip to content

Commit

Permalink
fix(local-notifications): return schedule on as object (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Sep 15, 2021
1 parent 294925b commit ca34b01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public static JSObject buildLocalNotificationPendingList(List<LocalNotification>
jsSchedule.put("at", schedule.getAt());
jsSchedule.put("every", schedule.getEvery());
jsSchedule.put("count", schedule.getCount());
jsSchedule.put("on", schedule.getOn());
jsSchedule.put("on", schedule.getOnObj());
jsSchedule.put("repeats", schedule.isRepeating());
jsNotification.put("schedule", jsSchedule);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public class LocalNotificationSchedule {

private Boolean whileIdle;

private JSObject scheduleObj;

public LocalNotificationSchedule(JSObject schedule) throws ParseException {
this.scheduleObj = schedule;
// Every specific unit of time (always constant)
buildEveryElement(schedule);
// Count of units of time from every to repeat on
Expand Down Expand Up @@ -72,6 +75,10 @@ public DateMatch getOn() {
return on;
}

public JSObject getOnObj() {
return this.scheduleObj.getJSObject("on");
}

public void setOn(DateMatch on) {
this.on = on;
}
Expand Down

0 comments on commit ca34b01

Please sign in to comment.