messagegui: option to not open the first unread message
parent
c893bc849f
commit
b81b6c2040
|
|
@ -109,4 +109,5 @@
|
||||||
0.80: Add ability to reply to messages if a reply library is installed and the message can be replied to
|
0.80: Add ability to reply to messages if a reply library is installed and the message can be replied to
|
||||||
0.81: Fix issue stopping Music message for being marked as read
|
0.81: Fix issue stopping Music message for being marked as read
|
||||||
Make sure play button image is transparent
|
Make sure play button image is transparent
|
||||||
Add top-right menu to music playback to allow message to be deleted
|
Add top-right menu to music playback to allow message to be deleted
|
||||||
|
0.82: Add option to not open the first unread message
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ function showMapMessage(msg) {
|
||||||
function back() { // mark as not new and return to menu
|
function back() { // mark as not new and return to menu
|
||||||
msg.new = false;
|
msg.new = false;
|
||||||
layout = undefined;
|
layout = undefined;
|
||||||
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:1,openMusic:0});
|
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:settings.showMsgIfUnread,openMusic:0});
|
||||||
}
|
}
|
||||||
Bangle.setUI({mode:"updown", back: back}, back); // any input takes us back
|
Bangle.setUI({mode:"updown", back: back}, back); // any input takes us back
|
||||||
}
|
}
|
||||||
|
|
@ -407,7 +407,7 @@ function showMessage(msgid, persist) {
|
||||||
msg.new = false;
|
msg.new = false;
|
||||||
cancelReloadTimeout(); // don't auto-reload to clock now
|
cancelReloadTimeout(); // don't auto-reload to clock now
|
||||||
Bangle.messageResponse(msg,false);
|
Bangle.messageResponse(msg,false);
|
||||||
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:1,openMusic:openMusic});
|
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:settings.showMsgIfUnread,openMusic:openMusic});
|
||||||
}; footer.push({type:"img",src:atob("PhAB4A8AAAAAAAPAfAMAAAAAD4PwHAAAAAA/H4DwAAAAAH78B8AAAAAA/+A/AAAAAAH/Af//////w/gP//////8P4D///////H/Af//////z/4D8AAAAAB+/AfAAAAAA/H4DwAAAAAPg/AcAAAAADwHwDAAAAAA4A8AAAAAAAA=="),col:"#f00",cb:negHandler});
|
}; footer.push({type:"img",src:atob("PhAB4A8AAAAAAAPAfAMAAAAAD4PwHAAAAAA/H4DwAAAAAH78B8AAAAAA/+A/AAAAAAH/Af//////w/gP//////8P4D///////H/Af//////z/4D8AAAAAB+/AfAAAAAA/H4DwAAAAAPg/AcAAAAADwHwDAAAAAA4A8AAAAAAAA=="),col:"#f00",cb:negHandler});
|
||||||
}
|
}
|
||||||
footer.push({fillx:1}); // push images to left/right
|
footer.push({fillx:1}); // push images to left/right
|
||||||
|
|
@ -421,7 +421,7 @@ function showMessage(msgid, persist) {
|
||||||
Bluetooth.println(JSON.stringify(result));
|
Bluetooth.println(JSON.stringify(result));
|
||||||
replying = false;
|
replying = false;
|
||||||
layout.render();
|
layout.render();
|
||||||
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:1,openMusic:openMusic});
|
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:settings.showMsgIfUnread,openMusic:openMusic});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
replying = false;
|
replying = false;
|
||||||
|
|
@ -435,7 +435,7 @@ function showMessage(msgid, persist) {
|
||||||
msg.new = false;
|
msg.new = false;
|
||||||
cancelReloadTimeout(); // don't auto-reload to clock now
|
cancelReloadTimeout(); // don't auto-reload to clock now
|
||||||
Bangle.messageResponse(msg,true);
|
Bangle.messageResponse(msg,true);
|
||||||
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:1,openMusic:openMusic});
|
checkMessages({clockIfNoMsg:1,clockIfAllRead:1,showMsgIfUnread:settings.showMsgIfUnread,openMusic:openMusic});
|
||||||
}; footer.push({type:"img",src:atob("QRABAAAAAAAAAAOAAAAABgAAA8AAAAADgAAD4AAAAAHgAAPgAAAAAPgAA+AAAAAAfgAD4///////gAPh///////gA+D///////AD4H//////8cPgAAAAAAPw8+AAAAAAAfB/4AAAAAAA8B/gAAAAAABwB+AAAAAAADAB4AAAAAAAAABgAA=="),col:"#0f0",cb:posHandler});
|
}; footer.push({type:"img",src:atob("QRABAAAAAAAAAAOAAAAABgAAA8AAAAADgAAD4AAAAAHgAAPgAAAAAPgAA+AAAAAAfgAD4///////gAPh///////gA+D///////AD4H//////8cPgAAAAAAPw8+AAAAAAAfB/4AAAAAAA8B/gAAAAAABwB+AAAAAAADAB4AAAAAAAAABgAA=="),col:"#0f0",cb:posHandler});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -447,7 +447,7 @@ function showMessage(msgid, persist) {
|
||||||
]},
|
]},
|
||||||
{ type:"btn",
|
{ type:"btn",
|
||||||
src:require("messageicons").getImage(msg),
|
src:require("messageicons").getImage(msg),
|
||||||
col:require("messageicons").getColor(msg, {settings:settings, default:g.theme.fg2}),
|
col:require("messageicons").getColor(msg, {settings, default:g.theme.fg2}),
|
||||||
pad: 3, cb:()=>{
|
pad: 3, cb:()=>{
|
||||||
cancelReloadTimeout(); // don't auto-reload to clock now
|
cancelReloadTimeout(); // don't auto-reload to clock now
|
||||||
showMessageSettings(msg);
|
showMessageSettings(msg);
|
||||||
|
|
@ -538,7 +538,7 @@ function checkMessages(options) {
|
||||||
}
|
}
|
||||||
if (img) {
|
if (img) {
|
||||||
var fg = g.getColor(),
|
var fg = g.getColor(),
|
||||||
col = require("messageicons").getColor(msg, {settings:settings, default:fg});
|
col = require("messageicons").getColor(msg, {settings, default:fg});
|
||||||
g.setColor(col).drawImage(img, x+24, r.y+24, {rotate:0}) // force centering
|
g.setColor(col).drawImage(img, x+24, r.y+24, {rotate:0}) // force centering
|
||||||
.setColor(fg); // only color the icon
|
.setColor(fg); // only color the icon
|
||||||
x += 50;
|
x += 50;
|
||||||
|
|
@ -594,7 +594,7 @@ setTimeout(() => {
|
||||||
// only openMusic on launch if music is new, or state=="show" (set by messagesmusic)
|
// only openMusic on launch if music is new, or state=="show" (set by messagesmusic)
|
||||||
var musicMsg = MESSAGES.find(m => m.id === "music");
|
var musicMsg = MESSAGES.find(m => m.id === "music");
|
||||||
checkMessages({
|
checkMessages({
|
||||||
clockIfNoMsg: 0, clockIfAllRead: 0, showMsgIfUnread: 1,
|
clockIfNoMsg: 0, clockIfAllRead: 0, showMsgIfUnread: settings.showMsgIfUnread,
|
||||||
openMusic: ((musicMsg&&musicMsg.new) && settings.openMusic) || (musicMsg&&musicMsg.state=="show"),
|
openMusic: ((musicMsg&&musicMsg.new) && settings.openMusic) || (musicMsg&&musicMsg.state=="show"),
|
||||||
dontStopBuzz: 1 });
|
dontStopBuzz: 1 });
|
||||||
}, 10); // if checkMessages wants to 'load', do that
|
}, 10); // if checkMessages wants to 'load', do that
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "messagegui",
|
"id": "messagegui",
|
||||||
"name": "Message UI",
|
"name": "Message UI",
|
||||||
"shortName": "Messages",
|
"shortName": "Messages",
|
||||||
"version": "0.81",
|
"version": "0.82",
|
||||||
"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",
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,5 @@
|
||||||
0.59: fixes message timeout by using setinterval, as it was intended. So the buzz is triggered every x seconds until the timeout occours.
|
0.59: fixes message timeout by using setinterval, as it was intended. So the buzz is triggered every x seconds until the timeout occours.
|
||||||
0.60: Bump version to allow new buzz.js module to be loaded - fixes memory/performance hog when buzz called
|
0.60: Bump version to allow new buzz.js module to be loaded - fixes memory/performance hog when buzz called
|
||||||
0.61: Add repeatCalls option to allow different repeat settings for messages vs calls
|
0.61: Add repeatCalls option to allow different repeat settings for messages vs calls
|
||||||
0.62: Add option for driving on left (affects roundabout icons in navigation)
|
0.62: Add option for driving on left (affects roundabout icons in navigation)
|
||||||
|
0.63: Add option to not open the first unread message
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "messages",
|
"id": "messages",
|
||||||
"name": "Messages",
|
"name": "Messages",
|
||||||
"version": "0.62",
|
"version": "0.63",
|
||||||
"description": "Library to handle, load and store message events received from Android/iOS",
|
"description": "Library to handle, load and store message events received from Android/iOS",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
if (settings.unreadTimeout===undefined) settings.unreadTimeout=60;
|
if (settings.unreadTimeout===undefined) settings.unreadTimeout=60;
|
||||||
if (settings.maxMessages===undefined) settings.maxMessages=3;
|
if (settings.maxMessages===undefined) settings.maxMessages=3;
|
||||||
if (settings.iconColorMode === undefined) settings.iconColorMode = iconColorModes[0];
|
if (settings.iconColorMode === undefined) settings.iconColorMode = iconColorModes[0];
|
||||||
|
if (settings.showMsgIfUnread === undefined) settings.showMsgIfUnread = 1;
|
||||||
settings.unlockWatch=!!settings.unlockWatch;
|
settings.unlockWatch=!!settings.unlockWatch;
|
||||||
settings.openMusic=!!settings.openMusic;
|
settings.openMusic=!!settings.openMusic;
|
||||||
settings.maxUnreadTimeout=240;
|
settings.maxUnreadTimeout=240;
|
||||||
|
|
@ -58,6 +59,10 @@
|
||||||
format: v => [/*LANG*/"Small",/*LANG*/"Medium"][v],
|
format: v => [/*LANG*/"Small",/*LANG*/"Medium"][v],
|
||||||
onchange: v => updateSetting("fontSize", v)
|
onchange: v => updateSetting("fontSize", v)
|
||||||
},
|
},
|
||||||
|
/*LANG*/'Auto-Open Unread Msg': {
|
||||||
|
value: !!settings().showMsgIfUnread,
|
||||||
|
onchange: v => updateSetting("showMsgIfUnread", v)
|
||||||
|
},
|
||||||
/*LANG*/'Auto-Open Music': {
|
/*LANG*/'Auto-Open Music': {
|
||||||
value: !!settings().openMusic,
|
value: !!settings().openMusic,
|
||||||
onchange: v => updateSetting("openMusic", v)
|
onchange: v => updateSetting("openMusic", v)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue