mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-01 03:55:47 +02:00
Fossil HR: fixed last notification widget
This commit is contained in:
parent
22ab26f9eb
commit
f68582eb46
@ -969,17 +969,22 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean packageFound = false;
|
||||||
|
|
||||||
// Send notification to watch
|
// Send notification to watch
|
||||||
try {
|
try {
|
||||||
for (NotificationHRConfiguration configuration : this.notificationConfigurations) {
|
for (NotificationHRConfiguration configuration : this.notificationConfigurations) {
|
||||||
if (configuration.getPackageName().equals(sourceAppId)) {
|
if (configuration.getPackageName().equals(sourceAppId)) {
|
||||||
LOG.info("Package found in notificationConfigurations, using custom icon: " + sourceAppId);
|
LOG.info("Package found in notificationConfigurations, using custom icon: " + sourceAppId);
|
||||||
queueWrite(new PlayTextNotificationRequest(sourceAppId, senderOrTitle, notificationSpec.body, notificationSpec.getId(), this));
|
queueWrite(new PlayTextNotificationRequest(sourceAppId, senderOrTitle, notificationSpec.body, notificationSpec.getId(), this));
|
||||||
return true;
|
packageFound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG.info("Package not found in notificationConfigurations, using generic icon: " + sourceAppId);
|
|
||||||
queueWrite(new PlayTextNotificationRequest("generic", senderOrTitle, notificationSpec.body, notificationSpec.getId(), this));
|
if(!packageFound) {
|
||||||
|
LOG.info("Package not found in notificationConfigurations, using generic icon: " + sourceAppId);
|
||||||
|
queueWrite(new PlayTextNotificationRequest("generic", senderOrTitle, notificationSpec.body, notificationSpec.getId(), this));
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Error while forwarding notification", e);
|
LOG.error("Error while forwarding notification", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user