Skip to content

Commit

Permalink
55926-elys
Browse files Browse the repository at this point in the history
  • Loading branch information
ELY M committed Dec 26, 2024
1 parent e7c1f79 commit 3ae7952
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="55924"
android:versionName="55924-elys">
android:versionCode="55926"
android:versionName="55926-elys">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/joshuatee/wx/misc/UtilityHourly.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ object UtilityHourly {
.replace("Freezing", "Frz")
.replace("T-storms", "Tst")
.replace("Isolated", "Iso")
.replace("Drizzle", "Dz")

fun get(locationNumber: Int): List<String> = if (UIPreferences.useNwsApiForHourly) {
getString(locationNumber)
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/java/joshuatee/wx/ui/SevenDayCollection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
23 changes: 22 additions & 1 deletion doc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 3ae7952

Please sign in to comment.