1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-02 11:26:09 +02:00

Huawei: Use generic notification type instead of wechat

* this match stock application Huawei Health
* devices show proper applications icons if it exist in firmware,
when type set to Wechat only wechat icon used
* sender name was not shown with wechat type
This commit is contained in:
Vitaliy Tomin 2024-03-30 22:23:42 +08:00 committed by José Rebelo
parent c85a0edace
commit 4986fdd0ea

View File

@ -44,13 +44,12 @@ public class SendNotificationRequest extends Request {
public static byte getNotificationType(NotificationType type) { public static byte getNotificationType(NotificationType type) {
switch (type.getGenericType()) { switch (type.getGenericType()) {
case "generic":
case "generic_social": case "generic_social":
case "generic_chat": case "generic_chat":
return Notifications.NotificationType.weChat; return Notifications.NotificationType.generic;
case "generic_email": case "generic_email":
return Notifications.NotificationType.email; return Notifications.NotificationType.email;
case "generic":
return Notifications.NotificationType.generic;
default: default:
return Notifications.NotificationType.sms; return Notifications.NotificationType.sms;
} }