Skip to content

Commit

Permalink
code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Radko Najman committed Oct 22, 2022
1 parent 23b9f5c commit 5389b53
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/SmartArcsActiveView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ class SmartArcsActiveView extends WatchUi.WatchFace {
}
}

drawSun(targetDc);
if (locationLatitude != offSettingFlag) {
drawSun(targetDc);
}

if (ticks != null) {
drawTicks(targetDc);
Expand Down Expand Up @@ -921,7 +923,7 @@ class SmartArcsActiveView extends WatchUi.WatchFace {
dc.setPenWidth(7);

//draw sunrise
if (sunriseColor != offSettingFlag && locationLatitude != offSettingFlag) {
if (sunriseColor != offSettingFlag) {
dc.setColor(sunriseColor, Graphics.COLOR_TRANSPARENT);
if (sunriseStartAngle > sunriseEndAngle) {
dc.drawArc(screenRadius, screenRadius, screenRadius - 17, Graphics.ARC_CLOCKWISE, sunriseStartAngle, sunriseEndAngle);
Expand All @@ -931,7 +933,7 @@ class SmartArcsActiveView extends WatchUi.WatchFace {
}

//draw sunset
if (sunsetColor != offSettingFlag && locationLatitude != offSettingFlag) {
if (sunsetColor != offSettingFlag) {
dc.setColor(sunsetColor, Graphics.COLOR_TRANSPARENT);
if (sunsetStartAngle > sunsetEndAngle) {
dc.drawArc(screenRadius, screenRadius, screenRadius - sunArcsOffset, Graphics.ARC_CLOCKWISE, sunsetStartAngle, sunsetEndAngle);
Expand Down

0 comments on commit 5389b53

Please sign in to comment.