Use || instead of comma conditions in the subjectless when
This commit is contained in:
@@ -241,7 +241,7 @@ class WeatherUpdateWorker(
|
||||
val weatherData = when {
|
||||
// A managed location means the provider resolves the position itself, so requesting
|
||||
// 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()
|
||||
if (location == null) {
|
||||
Log.e("WeatherUpdateWorker", "Location not set")
|
||||
|
||||
Reference in New Issue
Block a user