- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.3k
Add Oblique Strategies Clock face #4046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
        
          
                apps/obliqueclock/app.js
              
                Outdated
          
        
      | Bangle.removeListener('accel', accelHandler); | ||
| Bangle.removeListener('touch', onTap); | ||
| Bangle.removeListener('tap', onTap); | ||
| Bangle.removeAllListeners('lcdPower'); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll break widgets or boot code which listen to 'lcdPower', let's get hold of the function and remove just that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback and patience! I removed the removeListeners now. Or did you mean i should only remove thelcdPower line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah neither in fact :) I was thinking we do this:
-Bangle.on('lcdPower', on=>{
+const lcdListener = on => {
   if (on){ Bangle.on('accel', accelHandler); draw(); }
   else Bangle.removeListener('accel', accelHandler);
-});
+};
+Bangle.on('lcdPower', lcdListener);and:
     Bangle.removeListener('accel', accelHandler);
     Bangle.removeListener('touch', onTap);
     Bangle.removeListener('tap', onTap);
-    Bangle.removeAllListeners('lcdPower');
+    Bangle.removeListener('lcdPower', lcdListener);|  | ||
| // info row: Day N | Wed Oct. 22 | W43 | ||
| function makeInfoText(now, width){ | ||
| const doy=dayOfYear(now); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also use the Locale module, which provides all of this, and allows users to change settings for formatting to their preferences for international users as well.
This is my first contribution on Github. I appreciate any feedback. The watch face shows oblique strategies for getting unstuck in the creative process. Per tap or time change the text changes to a random different one. The time is rounded up to 5 Minutes. It also shows, if the user is moving or not with the acc.