mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 16:15:55 +01:00
ensure minimal forecastConditionType lenght for weather notifications
This commit is contained in:
parent
09eb470b64
commit
f1d83670d0
@ -83,7 +83,7 @@ public class ParcelableWeather2 implements Parcelable {
|
|||||||
Bundle forecastBundle = in.readBundle(getClass().getClassLoader());
|
Bundle forecastBundle = in.readBundle(getClass().getClassLoader());
|
||||||
String[] forecastConditionType = forecastBundle.getStringArray("weather_condition_types");
|
String[] forecastConditionType = forecastBundle.getStringArray("weather_condition_types");
|
||||||
int forecastConditionCode = 0;
|
int forecastConditionCode = 0;
|
||||||
if (forecastConditionType != null) {
|
if (forecastConditionType != null && forecastConditionType.length > 0) {
|
||||||
forecastConditionCode = weatherConditionTypesToOpenWeatherMapIds(forecastConditionType[0]);
|
forecastConditionCode = weatherConditionTypesToOpenWeatherMapIds(forecastConditionType[0]);
|
||||||
}
|
}
|
||||||
int forecastLowTemp = forecastBundle.getInt("weather_low_temp");
|
int forecastLowTemp = forecastBundle.getInt("weather_low_temp");
|
||||||
|
Loading…
Reference in New Issue
Block a user