diff --git a/CHANGELOG.md b/CHANGELOG.md index 806a2f20..35f3d512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,13 @@ ###Changelog -####Version 0.17.0 (next) +####Version 0.17.0 * Add weather support through "Weather Notification" app * Various fixes for K9 mail when using the generic notification receiver * Add a preference to hide the persistent notification icon of Gadgetbridge * Pebble: Support for build-in weather system app (FW 4.x) * Pebble: Add weather support for various watchfaces * Pebble: Add option to disable call display -* Pebble: Delete notifications that got dismissed on the phone +* Pebble: Add option to automatically delete notifications that got dismissed on the phone * Pebble: Bugfix for some PebbleKit enabled 3rd party apps (TCW and maybe other) * Pebble 2/LE: Improve reliablitly and transfer speed * HPlus: Improved discovery and pairing diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java index 80942dd9..81a41795 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -410,9 +410,12 @@ public class NotificationListener extends NotificationListenerService { return; } - LOG.info("notification removed, will ask device to delete it"); + Prefs prefs = GBApplication.getPrefs(); + if (prefs.getBoolean("autoremove_notifications", false)) { + LOG.info("notification removed, will ask device to delete it"); - GBApplication.deviceService().onDeleteNotification((int) sbn.getPostTime()); //FIMXE: a truly unique id would be better + GBApplication.deviceService().onDeleteNotification((int) sbn.getPostTime()); //FIMXE: a truly unique id would be better + } } private void dumpExtras(Bundle bundle) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cabf031a..0667156f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -114,6 +114,9 @@ Sunrise and Sunset Send sunrise and sunset times based on the location to the pebble timeline + Autoremove dismissed Notifications + Notifications are automatically removed from the Pebble when dismissed from the Android device + Location Acquire Location Latitude diff --git a/app/src/main/res/xml/changelog_master.xml b/app/src/main/res/xml/changelog_master.xml index 01795f09..d5f774bd 100644 --- a/app/src/main/res/xml/changelog_master.xml +++ b/app/src/main/res/xml/changelog_master.xml @@ -6,7 +6,7 @@ Add a preference to hide the notification icon of Gadgetbridge Pebble: Support for build-in weather system app (FW 4.x) Pebble: Add weather support for various watchfaces - Pebble: Delete notifications that got dismissed on the phone + Pebble: Add option to automatically delete notifications that got dismissed on the phone Pebble: Add option to disable call display Pebble: Bugfix for some PebbleKit enabled 3rd party apps (TCW and maybe other) Pebble 2/LE: Improve reliablitly and transfer speed diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 43985431..84bba8c3 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -172,6 +172,11 @@ android:title="@string/pref_title_sunrise_sunset" android:summary="@string/pref_summary_sunrise_sunset" android:key="send_sunrise_sunset" /> +