Prechádzať zdrojové kódy

Renamed attribute type to trigger

Sebastián Katzer 8 rokov pred
rodič
commit
e9da77acfa

+ 4 - 4
src/ios/APPNotificationOptions.m

@@ -61,9 +61,9 @@
  *
  * @return [ NSString* ]
  */
-- (NSString*) type
+- (NSString*) triggerType
 {
-    NSString* type = [dict objectForKey:@"type"];
+    NSString* type = [dict objectForKey:@"trigger"];
 
     return type.length ? type : @"normal";
 }
@@ -276,12 +276,12 @@
  */
 - (UNNotificationTrigger*) trigger
 {
-    NSString* type = [self type];
+    NSString* type = [self triggerType];
 
     if ([type isEqualToString:@"location"])
         return [self triggerWithRegion];
 
-    if (![type isEqualToString:@"normal"])
+    if (![type isEqualToString:@"date"])
         NSLog(@"Unknown type: %@", type);
 
     if ([self isRepeating])

+ 2 - 2
www/local-notification-util.js

@@ -21,16 +21,16 @@ var exec    = require('cordova/exec'),
 // Default values
 exports._defaults = {
     id:      0,
-    type:    'normal',
     text:    '',
     title:   '',
     sound:   'res://platform_default',
+    trigger: 'date',
     badge:   undefined,
     data:    undefined,
     every:   undefined,
     at:      undefined,
     actions: undefined,
-    actionGroupId: undefined
+    actionGroupId: undefined,
 };
 
 // Listener