diff --git a/apps.json b/apps.json index e36c573f4..5072ad5bf 100644 --- a/apps.json +++ b/apps.json @@ -77,7 +77,7 @@ { "id": "messages", "name": "Messages", - "version": "0.15", + "version": "0.16", "description": "App to display notifications from iOS and Gadgetbridge", "icon": "app.png", "type": "app", diff --git a/apps/messages/ChangeLog b/apps/messages/ChangeLog index 76407cb45..fe46ba97a 100644 --- a/apps/messages/ChangeLog +++ b/apps/messages/ChangeLog @@ -22,3 +22,4 @@ Now update correctly when 'require("messages").clearAll()' is called 0.14: Hide widget when all unread notifications are dismissed from phone 0.15: Don't buzz when Quiet Mode is active +0.16: Fix text wrapping so it fits the screen even if title is big (fix #1147) diff --git a/apps/messages/app.js b/apps/messages/app.js index eb066acb9..e36bb699e 100644 --- a/apps/messages/app.js +++ b/apps/messages/app.js @@ -243,7 +243,8 @@ function showMessage(msgid) { checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:1}); }}); } - lines = g.wrapString(msg.body, g.getWidth()-10); + var bodyFont = fontMedium; + lines = g.setFont(bodyFont).wrapString(msg.body, g.getWidth()-10); var body = (lines.length>4) ? lines.slice(0,4).join("\n")+"..." : lines.join("\n"); layout = new Layout({ type:"v", c: [ {type:"h", fillx:1, bgCol:colBg, c: [ @@ -256,7 +257,7 @@ function showMessage(msgid) { title?{type:"txt", font:titleFont, label:title, bgCol:colBg, fillx:1, pad:2 }:{}, ]}, ]}, - {type:"txt", font:fontMedium, label:body, fillx:1, filly:1, pad:2 }, + {type:"txt", font:bodyFont, label:body, fillx:1, filly:1, pad:2 }, {type:"h",fillx:1, c: buttons} ]}); g.clearRect(Bangle.appRect);