Skip to content

Commit

Permalink
disable storing location into settings - causes unknown error
Browse files Browse the repository at this point in the history
  • Loading branch information
Radko Najman committed Apr 10, 2022
1 parent 34aee31 commit e81c923
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.3.3 (April 10, 2022)
* small bugfix

# 1.3.2 (April 2, 2022)
* twilights indicator fix - hide indicator if position is not available

Expand Down
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3">
<iq:application entry="SmartArcsTripApp" id="547fb49c0626476280e1121801561e5c" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watchface" version="1.3.2">
<iq:application entry="SmartArcsTripApp" id="547fb49c0626476280e1121801561e5c" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watchface" version="1.3.3">
<iq:products>
<iq:product id="d2air"/>
<iq:product id="d2charlie"/>
Expand Down
2 changes: 1 addition & 1 deletion manifest.xml.beta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3">
<iq:application entry="SmartArcsTripApp" id="5b7bdde686cc4867be63faf4c6ca83fb" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watchface" version="1.3.15">
<iq:application entry="SmartArcsTripApp" id="5b7bdde686cc4867be63faf4c6ca83fb" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watchface" version="1.3.23">
<iq:products>
<iq:product id="d2air"/>
<iq:product id="d2charlie"/>
Expand Down
2 changes: 1 addition & 1 deletion manifest.xml.prod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3">
<iq:application entry="SmartArcsTripApp" id="547fb49c0626476280e1121801561e5c" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watchface" version="1.3.2">
<iq:application entry="SmartArcsTripApp" id="547fb49c0626476280e1121801561e5c" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watchface" version="1.3.3">
<iq:products>
<iq:product id="d2air"/>
<iq:product id="d2charlie"/>
Expand Down
2 changes: 2 additions & 0 deletions resources/settings/properties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@

<property id="sunriseColor" type="number">0xAA0000</property>
<property id="sunsetColor" type="number">0x0000FF</property>
<!--
<property id="locationLatitude" type="number">-999</property>
<property id="locationLongitude" type="number">-999</property>
-->

<!--
<property id="dateFormat" type="number">1</property>
Expand Down
16 changes: 10 additions & 6 deletions source/SmartArcsTripView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ class SmartArcsTripView extends WatchUi.WatchFace {
var powerSaverIconColor;
var sunriseColor;
var sunsetColor;
var locationLatitude;
var locationLongitude;
var locationLatitude = -999;
var locationLongitude = -999;

function initialize() {
loadUserSettings();
Expand Down Expand Up @@ -488,8 +488,12 @@ class SmartArcsTripView extends WatchUi.WatchFace {
powerSaverRefreshInterval = app.getProperty("powerSaverRefreshInterval");
powerSaverIconColor = app.getProperty("powerSaverIconColor");

locationLatitude = app.getProperty("locationLatitude");
locationLongitude = app.getProperty("locationLongitude");
// locationLatitude = app.getProperty("locationLatitude");
// locationLongitude = app.getProperty("locationLongitude");
// if (locationLatitude == null || locationLongitude == null) {
// locationLatitude = -999;
// locationLongitude = -999;
// }

//ensure that constants will be pre-computed
precompute = true;
Expand Down Expand Up @@ -1008,8 +1012,8 @@ class SmartArcsTripView extends WatchUi.WatchFace {
}

if (hasLocation) {
Application.getApp().setProperty("locationLatitude", loc[0]);
Application.getApp().setProperty("locationLongitude", loc[1]);
// Application.getApp().setProperty("locationLatitude", loc[0]);
// Application.getApp().setProperty("locationLongitude", loc[1]);
locationLatitude = loc[0];
locationLongitude = loc[1];
}
Expand Down

0 comments on commit e81c923

Please sign in to comment.