diff --git a/app/build.gradle b/app/build.gradle index 3a0cce36..1289fd76 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -140,7 +140,7 @@ dependencies { // https://developer.android.com/studio/write/java8-support // https://developer.android.com/studio/write/java8-support-table // https://developer.android.com/reference/java/time/package-summary - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.3' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4' //elys mods implementation 'ch.acra:acra-mail:5.9.7' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5585dbb8..01fb35c8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -22,8 +22,8 @@ + android:versionCode="55926" + android:versionName="55926-elys"> diff --git a/app/src/main/java/joshuatee/wx/misc/UtilityHourly.kt b/app/src/main/java/joshuatee/wx/misc/UtilityHourly.kt index c79a0012..a9b18aac 100644 --- a/app/src/main/java/joshuatee/wx/misc/UtilityHourly.kt +++ b/app/src/main/java/joshuatee/wx/misc/UtilityHourly.kt @@ -85,6 +85,7 @@ object UtilityHourly { .replace("Freezing", "Frz") .replace("T-storms", "Tst") .replace("Isolated", "Iso") + .replace("Drizzle", "Dz") fun get(locationNumber: Int): List = if (UIPreferences.useNwsApiForHourly) { getString(locationNumber) diff --git a/app/src/main/java/joshuatee/wx/ui/SevenDayCollection.kt b/app/src/main/java/joshuatee/wx/ui/SevenDayCollection.kt index 1a648262..777f4e8b 100644 --- a/app/src/main/java/joshuatee/wx/ui/SevenDayCollection.kt +++ b/app/src/main/java/joshuatee/wx/ui/SevenDayCollection.kt @@ -24,14 +24,20 @@ package joshuatee.wx.ui import android.content.Context import android.widget.ScrollView import joshuatee.wx.objects.LatLon +import joshuatee.wx.safeGet import joshuatee.wx.util.SevenDay -class SevenDayCollection(val context: Context, private val boxForecast: VBox, val scrollView: ScrollView) { +class SevenDayCollection( + val context: Context, + private val boxForecast: VBox, + val scrollView: ScrollView +) { fun update(sevenDay: SevenDay, latLon: LatLon, showSunriseCard: Boolean) { boxForecast.removeChildren() sevenDay.icons.forEachIndexed { index, iconUrl -> - val cardSevenDay = CardSevenDay(context, iconUrl, true, sevenDay.forecastList[index]) + val cardSevenDay = + CardSevenDay(context, iconUrl, true, sevenDay.forecastList.safeGet(index)) cardSevenDay.connect { scrollView.smoothScrollTo(0, 0) } boxForecast.addWidget(cardSevenDay) } diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index 3f54451e..23119a29 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -2,7 +2,21 @@ # Developer ChangeLog -## 55924 2024_12_09 +## 55926 2024_12_26 + +* [ADD] + +## 55925 2024_12_26 + +* [ADD] In hourly, abbreviate "Drizzle" to "Dz" +* [ADD] updated lib + +``` +- coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.3' ++ coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4' +``` + +## 55924 2024_12_18 * [ADD] per **PNS24-66 Updated** NWS will implement a fix in advance of Dec 22 for the NWS API, thus 7 day forecast is now configurable again and defaults to using the new NWS API @@ -11,6 +25,13 @@ and Hourly * [ADD] ObjectMetar - for getting current conditions for main screen do manual retry if needed (like 7-day/hourly) +* [FIX] in report to the following crash report use a safeGet in one line of code + +``` +Exception java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 + at joshuatee.wx.ui.SevenDayCollection.update (SevenDayCollection.kt:34) + +``` ## 55923 2024_12_03