messages : If showMessage called with no message (eg all messages deleted) now return to the clock (fix #1267)

pull/1275/head
Gordon Williams 2022-01-12 09:14:33 +00:00
parent eed2d521e3
commit 5e353b6755
2 changed files with 2 additions and 1 deletions

View File

@ -27,3 +27,4 @@
0.18: Use app-specific icon colors 0.18: Use app-specific icon colors
Spread message action buttons out Spread message action buttons out
Back button now goes back to list of messages Back button now goes back to list of messages
If showMessage called with no message (eg all messages deleted) now return to the clock (fix #1267)

View File

@ -225,7 +225,7 @@ function showMessageSettings(msg) {
function showMessage(msgid) { function showMessage(msgid) {
var msg = MESSAGES.find(m=>m.id==msgid); var msg = MESSAGES.find(m=>m.id==msgid);
if (!msg) return checkMessages({clockIfNoMsg:0,clockIfAllRead:0,showMsgIfUnread:0}); // go home if no message found if (!msg) return checkMessages({clockIfNoMsg:1,clockIfAllRead:0,showMsgIfUnread:0}); // go home if no message found
if (msg.src=="Maps") { if (msg.src=="Maps") {
cancelReloadTimeout(); // don't auto-reload to clock now cancelReloadTimeout(); // don't auto-reload to clock now
return showMapMessage(msg); return showMapMessage(msg);