Commit 6d1b27f1 by Sebastián Katzer

Disable some code smells

parent b93cf65c
......@@ -19,6 +19,8 @@
* limitations under the License.
*/
// codebeat:disable[TOO_MANY_FUNCTIONS]
package de.appplant.cordova.plugin.localnotification;
import android.annotation.SuppressLint;
......@@ -634,3 +636,5 @@ public class LocalNotification extends CordovaPlugin {
}
}
// codebeat:enable[TOO_MANY_FUNCTIONS]
......@@ -19,6 +19,8 @@
* limitations under the License.
*/
// codebeat:disable[TOO_MANY_FUNCTIONS]
package de.appplant.cordova.plugin.notification;
import android.annotation.SuppressLint;
......@@ -415,3 +417,5 @@ public final class Manager {
}
}
// codebeat:enable[TOO_MANY_FUNCTIONS]
......@@ -19,6 +19,8 @@
* limitations under the License.
*/
// codebeat:disable[TOO_MANY_FUNCTIONS]
package de.appplant.cordova.plugin.notification;
import android.content.Context;
......@@ -677,3 +679,5 @@ public final class Options {
}
}
// codebeat:enable[TOO_MANY_FUNCTIONS]
......@@ -19,6 +19,8 @@
* limitations under the License.
*/
// codebeat:disable[TOO_MANY_FUNCTIONS]
#import "APPLocalNotification.h"
#import "APPNotificationContent.h"
#import "APPNotificationOptions.h"
......@@ -268,7 +270,7 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
[self.commandDelegate runInBackground:^{
int code = [command.arguments[0] intValue];
APPNotificationType type = NotifcationTypeUnknown;
switch (code) {
case 0:
type = NotifcationTypeAll;
......@@ -280,13 +282,13 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
type = NotifcationTypeTriggered;
break;
}
NSArray* ids = [_center getNotificationIdsByType:type];
CDVPluginResult* result;
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
messageAsArray:ids];
[self.commandDelegate sendPluginResult:result
callbackId:command.callbackId];
}];
......@@ -330,7 +332,7 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
APPNotificationType type = NotifcationTypeUnknown;
NSArray* toasts;
NSArray* ids;
switch (code) {
case 0:
type = NotifcationTypeAll;
......@@ -346,15 +348,15 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
toasts = [_center getNotificationOptionsById:ids];
break;
}
if (toasts == nil) {
toasts = [_center getNotificationOptionsByType:type];
}
CDVPluginResult* result;
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
messageAsArray:toasts];
[self.commandDelegate sendPluginResult:result
callbackId:command.callbackId];
}];
......@@ -404,7 +406,7 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
NSArray* actions = [command argumentAtIndex:2];
UNNotificationCategory* group;
BOOL found;
switch (code) {
case 0:
group = [APPNotificationCategory parse:actions withId:identifier];
......@@ -618,7 +620,7 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
CDVPluginResult *result = [CDVPluginResult
resultWithStatus:CDVCommandStatus_OK
messageAsBool:arg];
[self.commandDelegate sendPluginResult:result
callbackId:command.callbackId];
}
......@@ -702,3 +704,5 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
}
@end
// codebeat:enable[TOO_MANY_FUNCTIONS]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment