Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/messagegui/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,5 @@
Remove workaround for 2v10 (>3 years ago) - assume everyone is on never firmware now
0.86: Default to showing message scroller (with title, bigger icon)
0.87: Make choosing of font size more repeatable
0.88: Adjust padding calculation so messages are spaced out properly even when using international fonts
0.88: Adjust padding calculation so messages are spaced out properly even when using international fonts
0.89: Fix bugs related to empty titles and bodies
8 changes: 5 additions & 3 deletions apps/messagegui/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,12 @@ function showMessage(msgid, persist) {
active = "message";
// Normal text message display
let src=msg.src||/*LANG*/"Message", srcFont = fontSmall;
let title=msg.title, titleFont = fontLarge, lines;
let title=msg.title||"", titleFont = fontLarge, lines=[];
let body=msg.body, bodyFont = fontLarge;
// If no body, use the title text instead...
if (body===undefined) {
if (!body) {
body = title;
title = undefined;
title = "";
}
if (g.setFont(srcFont).stringWidth(src) > g.getWidth()-52)
srcFont = "4x6";
Expand All @@ -392,6 +392,8 @@ function showMessage(msgid, persist) {
}
lines = g.setFont(bodyFont).wrapString(body, w);
}
// By this point, `title` must be a string and `lines` must be an array of strings.
// Either or both can be empty, but neither can be `undefined` (#3969).
let negHandler,posHandler,rowLeftDraw,rowRightDraw;
if (msg.negative) {
negHandler = ()=>{
Expand Down
2 changes: 1 addition & 1 deletion apps/messagegui/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "messagegui",
"name": "Message UI",
"shortName": "Messages",
"version": "0.88",
"version": "0.89",
"description": "Default app to display notifications from iOS and Gadgetbridge/Android",
"icon": "app.png",
"type": "app",
Expand Down