Simplify checks
This commit is contained in:
parent
fc1883cf3c
commit
a09ccfca87
1 changed files with 2 additions and 2 deletions
|
@ -451,7 +451,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
|||
&& OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null) {
|
||||
if (settings.SAVE_TRACK_TO_GPX.get()
|
||||
&& locationTime - lastTimeUpdated > settings.SAVE_TRACK_INTERVAL.get()
|
||||
&& (ctx.getRoutingHelper().isFollowingMode() || lastRoutingApplicationMode == settings.getApplicationMode())) {
|
||||
&& lastRoutingApplicationMode == settings.getApplicationMode()) {
|
||||
record = true;
|
||||
} else if (settings.SAVE_GLOBAL_TRACK_TO_GPX.get()
|
||||
&& locationTime - lastTimeUpdated > settings.SAVE_GLOBAL_TRACK_INTERVAL.get()) {
|
||||
|
@ -714,7 +714,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
|||
OsmandSettings settings = ctx.getSettings();
|
||||
return OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null
|
||||
&& settings.SAVE_GLOBAL_TRACK_TO_GPX.get() || settings.SAVE_TRACK_TO_GPX.get()
|
||||
&& (ctx.getRoutingHelper().isFollowingMode() || lastRoutingApplicationMode == settings.getApplicationMode());
|
||||
&& lastRoutingApplicationMode == settings.getApplicationMode();
|
||||
}
|
||||
|
||||
public float getDistance() {
|
||||
|
|
Loading…
Reference in a new issue