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
b8d9e142
Commit
b8d9e142
authored
Mar 08, 2015
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fire `clear` instead of `cancel` when clicked on repeating notifications
parent
1ee8a5e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
CHANGELOG.md
CHANGELOG.md
+4
-0
ClickActivity.java
src/android/ClickActivity.java
+3
-3
APPLocalNotification.m
src/ios/APPLocalNotification.m
+6
-3
No files found.
CHANGELOG.md
View file @
b8d9e142
...
...
@@ -3,6 +3,10 @@ ChangeLog
Please also read the
[
Upgrade Guide
](
https://github.com/katzer/cordova-plugin-local-notifications/wiki/Upgrade-Guide
)
for more information.
#### Version 0.8.1 (not yet released)
-
Fire
`clear`
instead of
`cancel`
event when clicked on repeating notifications
### Version 0.8.0 (05.03.2015)
-
Support for iOS 8, Android 2 (SDK >= 7) and Android 5
...
...
src/android/ClickActivity.java
View file @
b8d9e142
...
...
@@ -43,9 +43,9 @@ public class ClickActivity extends de.appplant.cordova.plugin.notification.Click
public
void
onClick
(
Notification
notification
)
{
LocalNotification
.
fireEvent
(
"click"
,
notification
);
if
(!
notification
.
isRepeating
())
{
LocalNotification
.
fireEvent
(
"cancel"
,
notification
);
}
String
event
=
notification
.
isRepeating
()
?
"clear"
:
"cancel"
;
LocalNotification
.
fireEvent
(
event
,
notification
);
super
.
onClick
(
notification
);
}
...
...
src/ios/APPLocalNotification.m
View file @
b8d9e142
...
...
@@ -501,7 +501,6 @@
&&
notification
.
timeIntervalSinceFireDate
>
seconds
)
{
[
self
.
app
cancelLocalNotification
:
notification
];
[
self
fireEvent
:
@"cancel"
notification
:
notification
];
}
}
...
...
@@ -527,8 +526,12 @@
[
self
fireEvent
:
event
notification
:
notification
];
if
([
event
isEqualToString
:
@"click"
]
&&
!
[
notification
isRepeating
])
{
if
(
!
[
event
isEqualToString
:
@"click"
])
return
;
if
([
notification
isRepeating
])
{
[
self
fireEvent
:
@"clear"
notification
:
notification
];
}
else
{
[
self
.
app
cancelLocalNotification
:
notification
];
[
self
fireEvent
:
@"cancel"
notification
:
notification
];
}
...
...
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