Dedent this code with a continue.

master
voussoir 2023-04-02 12:12:32 -07:00
parent 61169a56de
commit 1a18ac22e4
1 changed files with 25 additions and 24 deletions

View File

@ -253,8 +253,10 @@ class TrackerService: Service()
// very inaccurate points so if those bail early we'd stay in sleep mode.
for ((index, homepoint) in trackbook.homepoints.withIndex())
{
if (homepoint.location.distanceTo(location) < homepoint.radius)
if (homepoint.location.distanceTo(location) > homepoint.radius)
{
continue
}
Log.i("VOUSSOIR", "Omitting due to homepoint ${index} ${homepoint.name}.")
if (index > 0)
{
@ -279,7 +281,6 @@ class TrackerService: Service()
}
return
}
}
if (arrived_at_home > 0)
{
Log.i("VOUSSOIR", "Leaving home.")