mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-27 10:07:32 +01:00
Ensure we automatically convert unrenderable chars the title/description of calendar events
This commit is contained in:
parent
e003e0b672
commit
bb1323dd61
@ -846,6 +846,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String renderUnicodeAsImage(String txt) {
|
public String renderUnicodeAsImage(String txt) {
|
||||||
|
// FIXME: it looks like we could implement this as customStringFilter now so it happens automatically
|
||||||
if (txt==null) return null;
|
if (txt==null) return null;
|
||||||
// Simple conversions
|
// Simple conversions
|
||||||
txt = txt.replaceAll("…", "...");
|
txt = txt.replaceAll("…", "...");
|
||||||
@ -1158,9 +1159,9 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
o.put("type", calendarEventSpec.type); //implement this too? (sunrise and set)
|
o.put("type", calendarEventSpec.type); //implement this too? (sunrise and set)
|
||||||
o.put("timestamp", calendarEventSpec.timestamp);
|
o.put("timestamp", calendarEventSpec.timestamp);
|
||||||
o.put("durationInSeconds", calendarEventSpec.durationInSeconds);
|
o.put("durationInSeconds", calendarEventSpec.durationInSeconds);
|
||||||
o.put("title", calendarEventSpec.title);
|
o.put("title", renderUnicodeAsImage(calendarEventSpec.title));
|
||||||
o.put("description", calendarEventSpec.description);
|
o.put("description", renderUnicodeAsImage(calendarEventSpec.description));
|
||||||
o.put("location", calendarEventSpec.location);
|
o.put("location", renderUnicodeAsImage(calendarEventSpec.location));
|
||||||
o.put("calName", calendarEventSpec.calName);
|
o.put("calName", calendarEventSpec.calName);
|
||||||
o.put("color", calendarEventSpec.color);
|
o.put("color", calendarEventSpec.color);
|
||||||
o.put("allDay", calendarEventSpec.allDay);
|
o.put("allDay", calendarEventSpec.allDay);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user