Commit d01c621b authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

Do not fire `clear` or `cancel` event when clicked on persistent notifications

parent b8d9e142
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ Please also read the [Upgrade Guide](https://github.com/katzer/cordova-plugin-lo
#### Version 0.8.1 (not yet released)

- Fire `clear` instead of `cancel` event when clicked on repeating notifications
- Do not fire `clear` or `cancel` event when clicked on persistent notifications

### Version 0.8.0 (05.03.2015)

+2 −0
Changes for src/android/ClickActivity.java: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -43,9 +43,11 @@ public class ClickActivity extends de.appplant.cordova.plugin.notification.Click
    public void onClick(Notification notification) {
        LocalNotification.fireEvent("click", notification);

        if (!notification.getOptions().isOngoing()) {
            String event = notification.isRepeating() ? "clear" : "cancel";

            LocalNotification.fireEvent(event, notification);
        }

        super.onClick(notification);
    }