Use || instead of comma conditions in the subjectless when
This commit is contained in:
@@ -241,7 +241,7 @@ class WeatherUpdateWorker(
|
|||||||
val weatherData = when {
|
val weatherData = when {
|
||||||
// A managed location means the provider resolves the position itself, so requesting
|
// A managed location means the provider resolves the position itself, so requesting
|
||||||
// one here would be wasted work that holds the location stack open.
|
// one here would be wasted work that holds the location stack open.
|
||||||
settingsData.managedLocation, !settingsData.autoLocation -> {
|
settingsData.managedLocation || !settingsData.autoLocation -> {
|
||||||
val location = settings.location.first()
|
val location = settings.location.first()
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
Log.e("WeatherUpdateWorker", "Location not set")
|
Log.e("WeatherUpdateWorker", "Location not set")
|
||||||
|
|||||||
Reference in New Issue
Block a user