Skip to content

Commit

Permalink
feat: update log
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarinibruno committed Dec 19, 2024
1 parent 7ca800f commit e4061a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/main/java/com/android/periodpals/ui/map/Map.kt
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,10 @@ fun MapScreen(
Log.d(TAG, "Successfully fetched alerts within radius: $radiusInMeters")
},
onFailure = { e -> Log.e(TAG, "Error fetching alerts within radius", e) })
} ?: Log.d(TAG, "Please select a valid location")
} ?: Log.d(TAG, "Selected location is null")

// Due to lazy evaluation, if the first clause is true, then the second will be
// skipped
// and it will evaluate the third clause after the &&.
// skipped and it will evaluate the third clause after the &&.
alertViewModel.setFilter {
(productFilter == Product.NO_PREFERENCE ||
(it.product == productFilter || it.product == Product.NO_PREFERENCE)) &&
Expand Down

0 comments on commit e4061a4

Please sign in to comment.