Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
6d1b27f1
Commit
6d1b27f1
authored
Feb 21, 2018
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable some code smells
parent
b93cf65c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
10 deletions
+26
-10
LocalNotification.java
src/android/LocalNotification.java
+4
-0
Manager.java
src/android/notification/Manager.java
+4
-0
Options.java
src/android/notification/Options.java
+4
-0
APPLocalNotification.m
src/ios/APPLocalNotification.m
+14
-10
No files found.
src/android/LocalNotification.java
View file @
6d1b27f1
...
...
@@ -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]
src/android/notification/Manager.java
View file @
6d1b27f1
...
...
@@ -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]
src/android/notification/Options.java
View file @
6d1b27f1
...
...
@@ -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]
src/ios/APPLocalNotification.m
View file @
6d1b27f1
...
...
@@ -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]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment