From 48b89f1bd264a280ae9c19f63f5cdb1d78714209 Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Sat, 17 Feb 2018 17:33:34 +0100 Subject: [PATCH] Add Kontalk to the chat applications. Notifications coming from the org.kontalk package are treated as chat messages. This closes #994 --- CHANGELOG.md | 3 +++ .../freeyourgadget/gadgetbridge/model/AppNotificationType.java | 3 +++ .../freeyourgadget/gadgetbridge/model/NotificationType.java | 2 ++ .../gadgetbridge/service/btle/BLETypeConversions.java | 1 + .../gadgetbridge/service/devices/huami/HuamiIcon.java | 1 + .../freeyourgadget/gadgetbridge/util/NotificationUtils.java | 1 + app/src/main/res/xml/changelog_master.xml | 3 +++ 7 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd7c960e4..e0ef61ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### Changelog +#### Version next +* Display the chat icon for notifications coming from the Kontalk app + #### Version 0.24.5 * Fix crash in settings activity with export location * Fix notification deletion regression diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/AppNotificationType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/AppNotificationType.java index 3b2f41044..5d8f94b3f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/AppNotificationType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/AppNotificationType.java @@ -76,6 +76,9 @@ public class AppNotificationType extends HashMap { // Threema put("ch.threema.app", NotificationType.THREEMA); + // Kontalk + put("org.kontalk", NotificationType.KONTALK); + // Twitter put("org.mariotaku.twidere", NotificationType.TWITTER); put("com.twitter.android", NotificationType.TWITTER); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java index 64fcd3e16..4a0628b56 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java @@ -59,6 +59,7 @@ public enum NotificationType { SNAPCHAT(PebbleIconID.NOTIFICATION_SNAPCHAT, PebbleColor.Icterine), TELEGRAM(PebbleIconID.NOTIFICATION_TELEGRAM, PebbleColor.VividCerulean), THREEMA(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen), + KONTALK(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen), TRANSIT(PebbleIconID.LOCATION, PebbleColor.JaegerGreen), TWITTER(PebbleIconID.NOTIFICATION_TWITTER, PebbleColor.BlueMoon), VIBER(PebbleIconID.NOTIFICATION_VIBER, PebbleColor.VividViolet), @@ -104,6 +105,7 @@ public enum NotificationType { case SIGNAL: case TELEGRAM: case THREEMA: + case KONTALK: case WHATSAPP: case GOOGLE_MESSENGER: case GOOGLE_HANGOUTS: diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BLETypeConversions.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BLETypeConversions.java index 12806b2e6..82bf3672c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BLETypeConversions.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BLETypeConversions.java @@ -289,6 +289,7 @@ public class BLETypeConversions { case SNAPCHAT: case TELEGRAM: case THREEMA: + case KONTALK: case TWITTER: case WHATSAPP: case VIBER: diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiIcon.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiIcon.java index de6ddfe6b..d6cd42a25 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiIcon.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiIcon.java @@ -67,6 +67,7 @@ public class HuamiIcon { case CONVERSATIONS: case RIOT: case HIPCHAT: + case KONTALK: return WECHAT; case GENERIC_EMAIL: case GMAIL: diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/NotificationUtils.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/NotificationUtils.java index 140eed573..7d6b7aa6b 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/NotificationUtils.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/NotificationUtils.java @@ -47,6 +47,7 @@ public class NotificationUtils { case SNAPCHAT: case TELEGRAM: case THREEMA: + case KONTALK: case TWITTER: case WHATSAPP: case VIBER: diff --git a/app/src/main/res/xml/changelog_master.xml b/app/src/main/res/xml/changelog_master.xml index 4b385c038..6986cb413 100644 --- a/app/src/main/res/xml/changelog_master.xml +++ b/app/src/main/res/xml/changelog_master.xml @@ -1,5 +1,8 @@ + + Display the chat icon for notifications coming from the Kontalk app + Fix crash in settings activity with export location Fix notification deletion regression