piggz / harbour-amazfish

Amazfit Bip support for SailfishOS
GNU General Public License v3.0
103 stars 51 forks source link

Only category CustomHuami should have icon in header #333

Closed jmlich closed 7 months ago

jmlich commented 7 months ago

The implementation in GadgetBridge sends icon only when the

        if (alert.getCategory() == AlertCategory.CustomHuami) {

See https://github.com/Freeyourgadget/Gadgetbridge/blob/275deb4d06de6b64c0d7e73d13f6f2ad2879fe25/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/profiles/alertnotification/AlertNotificationProfile.java#L106

The same issue was basically with Phone Calls https://github.com/piggz/harbour-amazfish/pull/286, which contain category IncomingCall, so icon byte is not expected.

Additionally, mapSenderToIcon() was triggered twice even icon variable already contain the result.