Skip to content

Commit

Permalink
Fix buzz.js - whenever called this used to keep firing an interval ev…
Browse files Browse the repository at this point in the history
…ery 100ms, and they would build up!
  • Loading branch information
gfwilliams committed Jun 8, 2023
1 parent a299ac1 commit 2b6f776
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/messages/ChangeLog
Expand Up @@ -3,3 +3,4 @@
0.57: Optimize saving empty message list
0.58: show/hide "messages" widget directly, instead of through library stub
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
2 changes: 1 addition & 1 deletion apps/messages/metadata.json
@@ -1,7 +1,7 @@
{
"id": "messages",
"name": "Messages",
"version": "0.59",
"version": "0.60",
"description": "Library to handle, load and store message events received from Android/iOS",
"icon": "app.png",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion modules/buzz.js
Expand Up @@ -16,7 +16,7 @@
*/
exports.pattern = pattern => new Promise(resolve => {
function doBuzz() {
if (pattern == "") resolve();
if (pattern == "") return resolve();
var c = pattern[0];
pattern = pattern.substr(1);
const BUZZ_WEAK = 0.25, BUZZ_STRONG = 1;
Expand Down

0 comments on commit 2b6f776

Please sign in to comment.