1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-25 19:36:50 +01:00

Add support for Telegram (from web) and Discord

This commit is contained in:
musover 2021-11-21 19:06:32 +01:00 committed by Gitea
parent 33b5a6de38
commit 907ffafa62
3 changed files with 15 additions and 13 deletions

View File

@ -78,6 +78,7 @@ public class AppNotificationType extends HashMap<String, NotificationType> {
// Telegram
put("org.telegram.messenger", NotificationType.TELEGRAM);
put("org.telegram.messenger.beta", NotificationType.TELEGRAM);
put("org.telegram.messenger.web", NotificationType.TELEGRAM);
put("org.telegram.plus", NotificationType.TELEGRAM); // "Plus Messenger"
put("org.thunderdog.challegram", NotificationType.TELEGRAM);
put("nekox.messenger", NotificationType.TELEGRAM);
@ -170,6 +171,9 @@ public class AppNotificationType extends HashMap<String, NotificationType> {
// Etar
put("ws.xsoh.etar", NotificationType.GENERIC_CALENDAR);
// Discord
put("com.discord", NotificationType.DISCORD);
}
}

View File

@ -63,6 +63,7 @@ public enum NotificationType {
THREEMA(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
KONTALK(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
ANTOX(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
DISCORD(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.Purpureus),
TRANSIT(PebbleIconID.LOCATION, PebbleColor.JaegerGreen),
TWITTER(PebbleIconID.NOTIFICATION_TWITTER, PebbleColor.BlueMoon),
VIBER(PebbleIconID.NOTIFICATION_VIBER, PebbleColor.VividViolet),
@ -122,6 +123,7 @@ public enum NotificationType {
case SLACK:
case LINE:
case VIBER:
case DISCORD:
return "generic_chat";
case GMAIL:
case GOOGLE_INBOX:

View File

@ -32,14 +32,14 @@ public class HuamiIcon {
public static final byte SNAPCHAT = 6;
public static final byte WHATSAPP = 7;
public static final byte RED_WHITE_FIRE_8 = 8;
public static final byte CHINESE_9 = 9;
public static final byte CHINESE_9 = 9; //taobao
public static final byte ALARM_CLOCK = 10;
public static final byte APP_11 = 11;
public static final byte INSTAGRAM = 12;
public static final byte CHAT_BLUE_13 = 13;
public static final byte COW_14 = 14;
public static final byte CHINESE_15 = 15;
public static final byte CHINESE_16 = 16;
public static final byte CHINESE_15 = 15; // sender disregarded (amazfit)
public static final byte CHINESE_16 = 16; // sender disregarded (amazfit)
public static final byte STAR_17 = 17;
public static final byte APP_18 = 18;
public static final byte CHINESE_19 = 19;
@ -64,28 +64,28 @@ public class HuamiIcon {
public static byte mapToIconId(NotificationType type) {
switch (type) {
case UNKNOWN:
case GENERIC_NAVIGATION:
return APP_11;
case CONVERSATIONS:
case RIOT:
case HIPCHAT:
case KONTALK:
case ANTOX:
case GENERIC_SMS:
case WECHAT:
return WECHAT;
case GENERIC_EMAIL:
case GMAIL:
case YAHOO_MAIL:
case OUTLOOK:
return EMAIL;
case GENERIC_NAVIGATION:
return APP_11;
case GENERIC_SMS:
return WECHAT;
case GENERIC_CALENDAR:
case BUSINESS_CALENDAR:
return CALENDAR;
case FACEBOOK:
return FACEBOOK;
case FACEBOOK_MESSENGER:
case SIGNAL:
return FACEBOOK_MESSENGER;
case GOOGLE_HANGOUTS:
case GOOGLE_MESSENGER:
@ -97,9 +97,9 @@ public class HuamiIcon {
return KAKAOTALK;
case LINE:
return LINE;
case SIGNAL:
return FACEBOOK_MESSENGER;
case WIRE:
case THREEMA:
case DISCORD:
return CHAT_BLUE_13;
case TWITTER:
return TWITTER;
@ -109,12 +109,8 @@ public class HuamiIcon {
return SNAPCHAT;
case TELEGRAM:
return TELEGRAM;
case THREEMA:
return CHAT_BLUE_13;
case VIBER:
return VIBER;
case WECHAT:
return WECHAT;
case WHATSAPP:
return WHATSAPP;
case GENERIC_ALARM_CLOCK: