termux / termux-api-package

Termux package containing scripts to call functionality in Termux:API.
MIT License
1.02k stars 318 forks source link

Change alert-once to alert-always #83

Closed AgentConDier closed 5 years ago

AgentConDier commented 5 years ago

By default, editing a notification creates no alert, so alert-once had no effect. Changed to flag alert-always that sets alert-once to false if present. (Defaults to true in https://github.com/termux/termux-api/blob/master/app/src/main/java/com/termux/api/NotificationAPI.java#L80)

xalexalex commented 5 years ago

Hey, Thanks for spotting this, there's indeed a problem with --alert-once. However, I think that for transparency with the Android method (setOnlyAlertOnce()) and in compliance with Android's default (false, at least on my device), the change should be made in https://github.com/termux/termux-api/blob/master/app/src/main/java/com/termux/api/NotificationAPI.java#L80, by setting the default to false.

Regarding the second commit and the missing comma, that's also a nice catch!

xalexalex commented 5 years ago

Merged the second commit. Closing. Again, thanks @AgentConDier !