mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 13:26:50 +01:00
Add support for Telegram (from web) and Discord
This commit is contained in:
parent
33b5a6de38
commit
907ffafa62
@ -78,6 +78,7 @@ public class AppNotificationType extends HashMap<String, NotificationType> {
|
|||||||
// Telegram
|
// Telegram
|
||||||
put("org.telegram.messenger", NotificationType.TELEGRAM);
|
put("org.telegram.messenger", NotificationType.TELEGRAM);
|
||||||
put("org.telegram.messenger.beta", 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.telegram.plus", NotificationType.TELEGRAM); // "Plus Messenger"
|
||||||
put("org.thunderdog.challegram", NotificationType.TELEGRAM);
|
put("org.thunderdog.challegram", NotificationType.TELEGRAM);
|
||||||
put("nekox.messenger", NotificationType.TELEGRAM);
|
put("nekox.messenger", NotificationType.TELEGRAM);
|
||||||
@ -170,6 +171,9 @@ public class AppNotificationType extends HashMap<String, NotificationType> {
|
|||||||
|
|
||||||
// Etar
|
// Etar
|
||||||
put("ws.xsoh.etar", NotificationType.GENERIC_CALENDAR);
|
put("ws.xsoh.etar", NotificationType.GENERIC_CALENDAR);
|
||||||
|
|
||||||
|
// Discord
|
||||||
|
put("com.discord", NotificationType.DISCORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ public enum NotificationType {
|
|||||||
THREEMA(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
|
THREEMA(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
|
||||||
KONTALK(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
|
KONTALK(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
|
||||||
ANTOX(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
|
ANTOX(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.JaegerGreen),
|
||||||
|
DISCORD(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.Purpureus),
|
||||||
TRANSIT(PebbleIconID.LOCATION, PebbleColor.JaegerGreen),
|
TRANSIT(PebbleIconID.LOCATION, PebbleColor.JaegerGreen),
|
||||||
TWITTER(PebbleIconID.NOTIFICATION_TWITTER, PebbleColor.BlueMoon),
|
TWITTER(PebbleIconID.NOTIFICATION_TWITTER, PebbleColor.BlueMoon),
|
||||||
VIBER(PebbleIconID.NOTIFICATION_VIBER, PebbleColor.VividViolet),
|
VIBER(PebbleIconID.NOTIFICATION_VIBER, PebbleColor.VividViolet),
|
||||||
@ -122,6 +123,7 @@ public enum NotificationType {
|
|||||||
case SLACK:
|
case SLACK:
|
||||||
case LINE:
|
case LINE:
|
||||||
case VIBER:
|
case VIBER:
|
||||||
|
case DISCORD:
|
||||||
return "generic_chat";
|
return "generic_chat";
|
||||||
case GMAIL:
|
case GMAIL:
|
||||||
case GOOGLE_INBOX:
|
case GOOGLE_INBOX:
|
||||||
|
@ -32,14 +32,14 @@ public class HuamiIcon {
|
|||||||
public static final byte SNAPCHAT = 6;
|
public static final byte SNAPCHAT = 6;
|
||||||
public static final byte WHATSAPP = 7;
|
public static final byte WHATSAPP = 7;
|
||||||
public static final byte RED_WHITE_FIRE_8 = 8;
|
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 ALARM_CLOCK = 10;
|
||||||
public static final byte APP_11 = 11;
|
public static final byte APP_11 = 11;
|
||||||
public static final byte INSTAGRAM = 12;
|
public static final byte INSTAGRAM = 12;
|
||||||
public static final byte CHAT_BLUE_13 = 13;
|
public static final byte CHAT_BLUE_13 = 13;
|
||||||
public static final byte COW_14 = 14;
|
public static final byte COW_14 = 14;
|
||||||
public static final byte CHINESE_15 = 15;
|
public static final byte CHINESE_15 = 15; // sender disregarded (amazfit)
|
||||||
public static final byte CHINESE_16 = 16;
|
public static final byte CHINESE_16 = 16; // sender disregarded (amazfit)
|
||||||
public static final byte STAR_17 = 17;
|
public static final byte STAR_17 = 17;
|
||||||
public static final byte APP_18 = 18;
|
public static final byte APP_18 = 18;
|
||||||
public static final byte CHINESE_19 = 19;
|
public static final byte CHINESE_19 = 19;
|
||||||
@ -64,28 +64,28 @@ public class HuamiIcon {
|
|||||||
public static byte mapToIconId(NotificationType type) {
|
public static byte mapToIconId(NotificationType type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case UNKNOWN:
|
case UNKNOWN:
|
||||||
|
case GENERIC_NAVIGATION:
|
||||||
return APP_11;
|
return APP_11;
|
||||||
case CONVERSATIONS:
|
case CONVERSATIONS:
|
||||||
case RIOT:
|
case RIOT:
|
||||||
case HIPCHAT:
|
case HIPCHAT:
|
||||||
case KONTALK:
|
case KONTALK:
|
||||||
case ANTOX:
|
case ANTOX:
|
||||||
|
case GENERIC_SMS:
|
||||||
|
case WECHAT:
|
||||||
return WECHAT;
|
return WECHAT;
|
||||||
case GENERIC_EMAIL:
|
case GENERIC_EMAIL:
|
||||||
case GMAIL:
|
case GMAIL:
|
||||||
case YAHOO_MAIL:
|
case YAHOO_MAIL:
|
||||||
case OUTLOOK:
|
case OUTLOOK:
|
||||||
return EMAIL;
|
return EMAIL;
|
||||||
case GENERIC_NAVIGATION:
|
|
||||||
return APP_11;
|
|
||||||
case GENERIC_SMS:
|
|
||||||
return WECHAT;
|
|
||||||
case GENERIC_CALENDAR:
|
case GENERIC_CALENDAR:
|
||||||
case BUSINESS_CALENDAR:
|
case BUSINESS_CALENDAR:
|
||||||
return CALENDAR;
|
return CALENDAR;
|
||||||
case FACEBOOK:
|
case FACEBOOK:
|
||||||
return FACEBOOK;
|
return FACEBOOK;
|
||||||
case FACEBOOK_MESSENGER:
|
case FACEBOOK_MESSENGER:
|
||||||
|
case SIGNAL:
|
||||||
return FACEBOOK_MESSENGER;
|
return FACEBOOK_MESSENGER;
|
||||||
case GOOGLE_HANGOUTS:
|
case GOOGLE_HANGOUTS:
|
||||||
case GOOGLE_MESSENGER:
|
case GOOGLE_MESSENGER:
|
||||||
@ -97,9 +97,9 @@ public class HuamiIcon {
|
|||||||
return KAKAOTALK;
|
return KAKAOTALK;
|
||||||
case LINE:
|
case LINE:
|
||||||
return LINE;
|
return LINE;
|
||||||
case SIGNAL:
|
|
||||||
return FACEBOOK_MESSENGER;
|
|
||||||
case WIRE:
|
case WIRE:
|
||||||
|
case THREEMA:
|
||||||
|
case DISCORD:
|
||||||
return CHAT_BLUE_13;
|
return CHAT_BLUE_13;
|
||||||
case TWITTER:
|
case TWITTER:
|
||||||
return TWITTER;
|
return TWITTER;
|
||||||
@ -109,12 +109,8 @@ public class HuamiIcon {
|
|||||||
return SNAPCHAT;
|
return SNAPCHAT;
|
||||||
case TELEGRAM:
|
case TELEGRAM:
|
||||||
return TELEGRAM;
|
return TELEGRAM;
|
||||||
case THREEMA:
|
|
||||||
return CHAT_BLUE_13;
|
|
||||||
case VIBER:
|
case VIBER:
|
||||||
return VIBER;
|
return VIBER;
|
||||||
case WECHAT:
|
|
||||||
return WECHAT;
|
|
||||||
case WHATSAPP:
|
case WHATSAPP:
|
||||||
return WHATSAPP;
|
return WHATSAPP;
|
||||||
case GENERIC_ALARM_CLOCK:
|
case GENERIC_ALARM_CLOCK:
|
||||||
|
Loading…
Reference in New Issue
Block a user