Explorar o código

Fix issue with weekDay while date is same day just earlier

Sebastián Katzer %!s(int64=8) %!d(string=hai) anos
pai
achega
e14cfe98ca
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/android/notification/trigger/MatchTrigger.java

+ 3 - 1
src/android/notification/trigger/MatchTrigger.java

@@ -123,7 +123,7 @@ public class MatchTrigger extends IntervalTrigger {
     }
 
     /**
-     * Gets the first trigger date.
+     * Gets the date when to trigger the notification.
      *
      * @param base The date from where to calculate the trigger date.
      *
@@ -194,6 +194,7 @@ public class MatchTrigger extends IntervalTrigger {
                     addToDate(cal, now, Calendar.HOUR_OF_DAY, 0);
                     break;
                 case DAY:
+                case WEEK:
                     addToDate(cal, now, Calendar.DAY_OF_YEAR, 1);
                     break;
                 case MONTH:
@@ -213,6 +214,7 @@ public class MatchTrigger extends IntervalTrigger {
                     addToDate(cal, now, Calendar.HOUR_OF_DAY, 1);
                     break;
                 case DAY:
+                case WEEK:
                     addToDate(cal, now, Calendar.DAY_OF_YEAR, 1);
                     break;
                 case MONTH: