Merge pull request #1890 from alessandrococco/messages-patch-1
[Messages] Don't turn on the screen after unread timeout expiresmaster
commit
e23fceca2d
|
|
@ -51,3 +51,4 @@
|
|||
0.36: Ensure a new message plus an almost immediate deletion of that message doesn't load the messages app (fix #1362)
|
||||
0.37: Now use the setUI 'back' icon in the top left rather than specific buttons/menu items
|
||||
0.38: Add telegram foss handling
|
||||
0.39: Don't turn on the screen after unread timeout expires (#1873)
|
||||
|
|
|
|||
|
|
@ -411,19 +411,17 @@ function cancelReloadTimeout() {
|
|||
unreadTimeout = undefined;
|
||||
}
|
||||
|
||||
|
||||
g.clear();
|
||||
|
||||
Bangle.loadWidgets();
|
||||
Bangle.drawWidgets();
|
||||
|
||||
setTimeout(() => {
|
||||
var unreadTimeoutSecs = settings.unreadTimeout;
|
||||
if (unreadTimeoutSecs===undefined) unreadTimeoutSecs=60;
|
||||
if (unreadTimeoutSecs)
|
||||
unreadTimeout = setTimeout(function() {
|
||||
print("Message not seen - reloading");
|
||||
load();
|
||||
}, unreadTimeoutSecs*1000);
|
||||
var unreadTimeoutMillis = (settings.unreadTimeout || 60) * 1000;
|
||||
if (unreadTimeoutMillis) {
|
||||
unreadTimeout = setTimeout(load, unreadTimeoutMillis);
|
||||
}
|
||||
// only openMusic on launch if music is new
|
||||
var newMusic = MESSAGES.some(m=>m.id==="music"&&m.new);
|
||||
checkMessages({clockIfNoMsg:0,clockIfAllRead:0,showMsgIfUnread:1,openMusic:newMusic&&settings.openMusic});
|
||||
},10); // if checkMessages wants to 'load', do that
|
||||
var newMusic = MESSAGES.some(m => m.id === "music" && m.new);
|
||||
checkMessages({ clockIfNoMsg: 0, clockIfAllRead: 0, showMsgIfUnread: 1, openMusic: newMusic && settings.openMusic });
|
||||
}, 10); // if checkMessages wants to 'load', do that
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "messages",
|
||||
"name": "Messages",
|
||||
"version": "0.38",
|
||||
"version": "0.39",
|
||||
"description": "App to display notifications from iOS and Gadgetbridge/Android",
|
||||
"icon": "app.png",
|
||||
"type": "app",
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ draw:function(recall) {
|
|||
if (quiet) WIDGETS["messages"].t -= 500000; // if quiet, set last time in the past so there is no buzzing
|
||||
WIDGETS["messages"].width=this.iconwidth;
|
||||
Bangle.drawWidgets();
|
||||
Bangle.setLCDPower(1);// turns screen on
|
||||
},hide:function() {
|
||||
delete WIDGETS["messages"].t;
|
||||
delete WIDGETS["messages"].l;
|
||||
|
|
|
|||
Loading…
Reference in New Issue