Skip to content

Commit 8b0294d

Browse files
author
thyttan
committed
messagegui: suspend unread timeout when unlocked
1 parent d4206e4 commit 8b0294d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

apps/messagegui/app.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,14 @@ setTimeout(() => {
784784
}, 10); // if checkMessages wants to 'load', do that
785785

786786
/* If the Bangle is unlocked by the user, treat that
787-
as a queue to stop repeated buzzing */
787+
as a queue to stop repeated buzzing.
788+
Also suspend the reload timeout while the watch is unlocked. */
788789
Bangle.on('lock',locked => {
789-
if (!locked)
790+
if (!locked) {
790791
require("messages").stopBuzz();
792+
cancelReloadTimeout();
793+
}
794+
if (locked) {
795+
if ("messagegui.new.js"===global.__FILE__) {resetReloadTimeout();}
796+
}
791797
});

0 commit comments

Comments
 (0)