File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 117117 Remove workaround for 2v10 (>3 years ago) - assume everyone is on never firmware now
1181180.86: Default to showing message scroller (with title, bigger icon)
1191190.87: Make choosing of font size more repeatable
120- 0.88: Adjust padding calculation so messages are spaced out properly even when using international fonts
120+ 0.88: Adjust padding calculation so messages are spaced out properly even when using international fonts
121+ 0.89: Fix bugs related to empty titles and bodies
Original file line number Diff line number Diff line change @@ -361,12 +361,12 @@ function showMessage(msgid, persist) {
361361 active = "message" ;
362362 // Normal text message display
363363 let src = msg . src || /*LANG*/ "Message" , srcFont = fontSmall ;
364- let title = msg . title , titleFont = fontLarge , lines ;
364+ let title = msg . title || "" , titleFont = fontLarge , lines = [ ] ;
365365 let body = msg . body , bodyFont = fontLarge ;
366366 // If no body, use the title text instead...
367- if ( body === undefined ) {
367+ if ( ! body ) {
368368 body = title ;
369- title = undefined ;
369+ title = "" ;
370370 }
371371 if ( g . setFont ( srcFont ) . stringWidth ( src ) > g . getWidth ( ) - 52 )
372372 srcFont = "4x6" ;
@@ -392,6 +392,8 @@ function showMessage(msgid, persist) {
392392 }
393393 lines = g . setFont ( bodyFont ) . wrapString ( body , w ) ;
394394 }
395+ // By this point, `title` must be a string and `lines` must be an array of strings.
396+ // Either or both can be empty, but neither can be `undefined` (#3969).
395397 let negHandler , posHandler , rowLeftDraw , rowRightDraw ;
396398 if ( msg . negative ) {
397399 negHandler = ( ) => {
Original file line number Diff line number Diff line change 22 "id" : " messagegui" ,
33 "name" : " Message UI" ,
44 "shortName" : " Messages" ,
5- "version" : " 0.88 " ,
5+ "version" : " 0.89 " ,
66 "description" : " Default app to display notifications from iOS and Gadgetbridge/Android" ,
77 "icon" : " app.png" ,
88 "type" : " app" ,
You can’t perform that action at this time.
0 commit comments