Use method reference when sorting providers

This commit is contained in:
Maxime NATUREL 2022-06-09 09:55:27 +02:00
parent 755d743b06
commit 1b88cc39a9

View file

@ -83,7 +83,7 @@ class LocationTracker @Inject constructor(
onNoLocationProviderAvailable()
} else {
// Take GPS first
providers.sortedByDescending { getProviderPriority(it) }
providers.sortedByDescending(::getProviderPriority)
.mapNotNull { provider ->
Timber.d("track location using $provider")