Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Fix example app cancel notification#869

Merged
Gp2mv3 merged 1 commit intozo0r:masterfrom
hshiraiwa:fix/example-app-cancel-notification
Oct 8, 2018
Merged

Fix example app cancel notification#869
Gp2mv3 merged 1 commit intozo0r:masterfrom
hshiraiwa:fix/example-app-cancel-notification

Conversation

@hshiraiwa
Copy link
Copy Markdown

When testing the example app, I found it unable to cancel the last notification.
This issue was caused by the lastId variable representing the next id to be used instead of the id of the last created notification.
Because of that the cancelNotif function would try to cancel a notification not yet created.

To test this change:

  • Run the example app
  • Press Schedule a notification in 30s
  • Press Cancel last notification (if any)
  • Check if the scheduled notification was cancelled

The `lastId` should reflect the last id used not the next id to be used.
When the lastId is set to the next id to be used the `cancelNotif`
function will try to cancel a id not yet used.
@Gp2mv3 Gp2mv3 merged commit 1143632 into zo0r:master Oct 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants