Delete Timer messages

This commit is contained in:
Tanner Collin 2023-02-23 18:21:45 -07:00
parent 7fadeabf33
commit 443921c30e

View File

@ -13,7 +13,7 @@
/* For example for maps: /* For example for maps:
// a message // a message
require("messages").pushMessage({"t":"add","id":1575479849,"src":"Hangouts","title":"A Name","body":"message contents"}) require("messages").pushMessage({"t":"add","id":1575479849,"src":"Clock","title":"Timer","body":"test"})
// maps // maps
require("messages").pushMessage({"t":"add","id":1,"src":"Maps","title":"0 yd - High St","body":"Campton - 11:48 ETA","img":"GhqBAAAMAAAHgAAD8AAB/gAA/8AAf/gAP/8AH//gD/98B//Pg/4B8f8Afv+PP//n3/f5//j+f/wfn/4D5/8Aef+AD//AAf/gAD/wAAf4AAD8AAAeAAADAAA="}); require("messages").pushMessage({"t":"add","id":1,"src":"Maps","title":"0 yd - High St","body":"Campton - 11:48 ETA","img":"GhqBAAAMAAAHgAAD8AAB/gAA/8AAf/gAP/8AH//gD/98B//Pg/4B8f8Afv+PP//n3/f5//j+f/wfn/4D5/8Aef+AD//AAf/gAD/wAAf4AAD8AAAeAAADAAA="});
// call // call
@ -359,6 +359,11 @@ function showMessage(msgid) {
function checkMessages(options) { function checkMessages(options) {
options=options||{}; options=options||{};
if (MESSAGES.length && MESSAGES[0].title == "Timer") {
MESSAGES.pop(0);
return load();
}
// If no messages, just show 'no messages' and return // If no messages, just show 'no messages' and return
if (!MESSAGES.length) { if (!MESSAGES.length) {
if (!options.clockIfNoMsg) return E.showPrompt(/*LANG*/"No Messages",{ if (!options.clockIfNoMsg) return E.showPrompt(/*LANG*/"No Messages",{