Skip to content

Commit 89e7e06

Browse files
committed
Clean up ambigous lambdas
1 parent 36912b5 commit 89e7e06

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

juicy-noise-android/app/src/main/java/com/danand/juicynoise/MainActivity.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -755,11 +755,11 @@ fun runReadingLocation(
755755

756756
@SuppressLint("MissingPermission")
757757
suspend fun readLocation(locationClient: FusedLocationProviderClient): Location = suspendCoroutine { continuation ->
758-
locationClient.lastLocation.addOnCompleteListener {
759-
if (it.exception == null) {
760-
continuation.resume(it.result!!)
758+
locationClient.lastLocation.addOnCompleteListener { task ->
759+
if (task.exception == null) {
760+
continuation.resume(task.result!!)
761761
} else {
762-
throw it.exception!!
762+
throw task.exception!!
763763
}
764764
}
765765
}

0 commit comments

Comments
 (0)