minor code style update

This commit is contained in:
Tibor Kaputa 2023-06-10 09:15:32 +02:00 committed by GitHub
parent c17a79a7b4
commit 6a8ff89022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -30,9 +30,10 @@ class AccessHelper(
val rects = keys.map { val rects = keys.map {
Rect(it.x, it.y, it.x + it.width, it.y + it.height) Rect(it.x, it.y, it.x + it.width, it.y + it.height)
} }
rects.firstOrNull { it.contains(x.toInt(), y.toInt()) }?.let { exactRect ->
return rects.indexOf(exactRect) return rects.firstOrNull { it.contains(x.toInt(), y.toInt()) }?.let { exactRect ->
} ?: return HOST_ID rects.indexOf(exactRect)
} ?: HOST_ID
} }
/** /**