瀏覽代碼

Missing negation causes cancel of repeating notifications after 5 days

Sebastián Katzer 10 年之前
父節點
當前提交
e936d0e046
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/ios/APPLocalNotification.m

+ 2 - 2
src/ios/APPLocalNotification.m

@@ -486,7 +486,7 @@
 }
 }
 
 
 /**
 /**
- * Cancels all local notification with are older then
+ * Cancels all non-repeating local notification older then
  * a specific amount of seconds
  * a specific amount of seconds
  */
  */
 - (void) cancelAllNotificationsWhichAreOlderThen:(float)seconds
 - (void) cancelAllNotificationsWhichAreOlderThen:(float)seconds
@@ -497,7 +497,7 @@
 
 
     for (UILocalNotification* notification in notifications)
     for (UILocalNotification* notification in notifications)
     {
     {
-        if (notification && [notification isRepeating]
+        if (notification && ![notification isRepeating]
             && notification.timeIntervalSinceFireDate > seconds)
             && notification.timeIntervalSinceFireDate > seconds)
         {
         {
             [self.app cancelLocalNotification:notification];
             [self.app cancelLocalNotification:notification];