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
ef16347a
Commit
ef16347a
authored
Feb 05, 2018
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shorten some var names to be more readable
parent
cbfe67ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
APPLocalNotification.m
src/ios/APPLocalNotification.m
+13
-8
No files found.
src/ios/APPLocalNotification.m
View file @
ef16347a
...
...
@@ -38,6 +38,11 @@
@implementation
APPLocalNotification
UNNotificationPresentationOptions
const
OptionNone
=
UNNotificationPresentationOptionNone
;
UNNotificationPresentationOptions
const
OptionBadge
=
UNNotificationPresentationOptionBadge
;
UNNotificationPresentationOptions
const
OptionSound
=
UNNotificationPresentationOptionSound
;
UNNotificationPresentationOptions
const
OptionAlert
=
UNNotificationPresentationOptionAlert
;
@synthesize
deviceready
,
isActive
,
eventQueue
;
#pragma mark -
...
...
@@ -503,13 +508,13 @@
*/
-
(
void
)
userNotificationCenter
:
(
UNUserNotificationCenter
*
)
center
willPresentNotification
:
(
UNNotification
*
)
notification
withCompletionHandler
:
(
void
(
^
)(
UNNotificationPresentationOptions
))
completionH
andler
withCompletionHandler
:
(
void
(
^
)(
UNNotificationPresentationOptions
))
h
andler
{
UNNotificationRequest
*
toast
=
notification
.
request
;
[
_delegate
userNotificationCenter
:
center
willPresentNotification
:
notification
withCompletionHandler
:
completionH
andler
];
withCompletionHandler
:
h
andler
];
if
([
toast
.
trigger
isKindOfClass
:
UNPushNotificationTrigger
.
class
])
return
;
...
...
@@ -521,11 +526,11 @@
}
if
(
options
.
silent
)
{
completionHandler
(
UNNotificationPresentation
OptionNone
);
handler
(
OptionNone
);
}
else
if
(
!
isActive
||
options
.
priority
>
0
)
{
completionHandler
(
UNNotificationPresentationOptionBadge
|
UNNotificationPresentationOptionSound
|
UNNotificationPresentation
OptionAlert
);
handler
(
OptionBadge
|
OptionSound
|
OptionAlert
);
}
else
{
completionHandler
(
UNNotificationPresentationOptionBadge
|
UNNotificationPresentation
OptionSound
);
handler
(
OptionBadge
|
OptionSound
);
}
}
...
...
@@ -535,15 +540,15 @@
*/
-
(
void
)
userNotificationCenter
:
(
UNUserNotificationCenter
*
)
center
didReceiveNotificationResponse
:
(
UNNotificationResponse
*
)
response
withCompletionHandler
:
(
void
(
^
)(
void
))
completionH
andler
withCompletionHandler
:
(
void
(
^
)(
void
))
h
andler
{
UNNotificationRequest
*
toast
=
response
.
notification
.
request
;
[
_delegate
userNotificationCenter
:
center
didReceiveNotificationResponse
:
response
withCompletionHandler
:
completionH
andler
];
withCompletionHandler
:
h
andler
];
completionH
andler
();
h
andler
();
if
([
toast
.
trigger
isKindOfClass
:
UNPushNotificationTrigger
.
class
])
return
;
...
...
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