1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 14:32:54 +01:00

InifiniTime: Fix null being displayed on empty notifications

This commit is contained in:
Andreas Shimokawa 2021-08-26 10:50:56 +02:00
parent 44fcd454a0
commit 1bfec5b65f

View File

@ -260,6 +260,9 @@ public class PineTimeJFSupport extends AbstractBTLEDeviceSupport implements DfuL
TransactionBuilder builder = new TransactionBuilder("notification"); TransactionBuilder builder = new TransactionBuilder("notification");
String message; String message;
if (notificationSpec.body == null) {
notificationSpec.body = "";
}
if (isFirmwareAtLeastVersion0_15()) { if (isFirmwareAtLeastVersion0_15()) {
String senderOrTitle = nodomain.freeyourgadget.gadgetbridge.util.StringUtils.getFirstOf(notificationSpec.sender, notificationSpec.title); String senderOrTitle = nodomain.freeyourgadget.gadgetbridge.util.StringUtils.getFirstOf(notificationSpec.sender, notificationSpec.title);