Navigation messages no longer launch the Maps view unless they're new

pull/2837/head
Gordon Williams 2023-06-22 10:04:46 +01:00
parent 93b40bb6b5
commit f680be51d5
6 changed files with 9 additions and 3 deletions

View File

@ -26,3 +26,4 @@
0.25: Added option to 'ignore' an app from the message 0.25: Added option to 'ignore' an app from the message
0.26: Change handling of GPS status to depend on GPS events instead of connection events 0.26: Change handling of GPS status to depend on GPS events instead of connection events
0.27: Issue newline before GB commands (solves issue with console.log and ignored commands) 0.27: Issue newline before GB commands (solves issue with console.log and ignored commands)
0.28: Navigation messages no longer launch the Maps view unless they're new

View File

@ -203,6 +203,8 @@
event.t="add"; event.t="add";
event.src="maps"; // for the icon event.src="maps"; // for the icon
event.title="Navigation"; event.title="Navigation";
if (require("messages").getMessages().find(m=>m.id=="nav"))
event.t = "modify";
} else { } else {
event.t="remove"; event.t="remove";
} }

View File

@ -2,7 +2,7 @@
"id": "android", "id": "android",
"name": "Android Integration", "name": "Android Integration",
"shortName": "Android", "shortName": "Android",
"version": "0.27", "version": "0.28",
"description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.", "description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.",
"icon": "app.png", "icon": "app.png",
"tags": "tool,system,messages,notifications,gadgetbridge", "tags": "tool,system,messages,notifications,gadgetbridge",

View File

@ -97,4 +97,5 @@
0.70: Handle nav messages from newer Gadgetbridge builds that output distance as a String 0.70: Handle nav messages from newer Gadgetbridge builds that output distance as a String
If we receive a 'music' message and we're in the messages app (but not showing a message) show music (#2814) If we receive a 'music' message and we're in the messages app (but not showing a message) show music (#2814)
0.71: Cancel buzzing when watch unlocked, or when different messages viewed 0.71: Cancel buzzing when watch unlocked, or when different messages viewed
On 2v18.64+ firmware, 'No Messages' now has a 'back' button On 2v18.64+ firmware, 'No Messages' now has a 'back' button
0.72: Nav message updastes don't automatically launch navigation menu unless they're new

View File

@ -70,6 +70,8 @@ var onMessagesModified = function(type,msg) {
if (msg.state && msg.state!="play") openMusic = false; // no longer playing music to go back to if (msg.state && msg.state!="play") openMusic = false; // no longer playing music to go back to
if ((active!=undefined) && (active!="list") && (active!="music")) return; // don't open music over other screens (but do if we're in the main menu) if ((active!=undefined) && (active!="list") && (active!="music")) return; // don't open music over other screens (but do if we're in the main menu)
} }
if (msg && msg.id=="nav" && msg.t=="modify" && active!="map")
return; // don't show an updated nav message if we're just in the menu
showMessage(msg&&msg.id); showMessage(msg&&msg.id);
}; };
Bangle.on("message", onMessagesModified); Bangle.on("message", onMessagesModified);

View File

@ -2,7 +2,7 @@
"id": "messagegui", "id": "messagegui",
"name": "Message UI", "name": "Message UI",
"shortName": "Messages", "shortName": "Messages",
"version": "0.71", "version": "0.72",
"description": "Default app to display notifications from iOS and Gadgetbridge/Android", "description": "Default app to display notifications from iOS and Gadgetbridge/Android",
"icon": "app.png", "icon": "app.png",
"type": "app", "type": "app",