diff --git a/apps/ios/boot.js b/apps/ios/boot.js index bf14aeb07..d402facbb 100644 --- a/apps/ios/boot.js +++ b/apps/ios/boot.js @@ -56,6 +56,7 @@ E.on('notify',msg=>{ "message" : string, "messageSize" : string, "date" : string, + "new" : boolean, "posAction" : string, "negAction" : string, "name" : string, @@ -64,6 +65,7 @@ E.on('notify',msg=>{ "com.apple.facetime": "FaceTime", "com.apple.mobilecal": "Calendar", "com.apple.mobilemail": "Mail", + "com.apple.MobileSMS": "SMS Message", "com.apple.Passbook": "iOS Wallet", "com.apple.reminders": "Reminders", "com.apple.shortcuts": "Shortcuts", diff --git a/apps/messages/lib.js b/apps/messages/lib.js index acfef536f..586a82b67 100644 --- a/apps/messages/lib.js +++ b/apps/messages/lib.js @@ -1,6 +1,6 @@ exports.pushMessage = function(event) { /* event is: - {t:"add",id:int, src,title,subject,body,sender,tel, important:bool} // add new + {t:"add",id:int, src,title,subject,body,sender,tel, important:bool, new:bool} // add new {t:"add",id:int, id:"music", state, artist, track, etc} // add new {t:"remove-",id:int} // remove {t:"modify",id:int, title:string} // modified @@ -31,7 +31,11 @@ exports.pushMessage = function(event) { // if in app, process immediately if (inApp) return onMessagesModified(mIdx<0 ? {id:event.id} : messages[mIdx]); // ok, saved now - we only care if it's new - if (event.t!="add") return; + if (event.t!="add") { + return; + } else if(event.new == false) { + return; + } // otherwise load messages/show widget var loadMessages = Bangle.CLOCK || event.important; // first, buzz