Browse Source

v1.8 NullPointerException

Carles Sentis 11 months ago
parent
commit
a607231e61

+ 2 - 2
app/build.gradle.kts

@@ -14,8 +14,8 @@ android {
         applicationId = "com.arklan.weather"
         minSdk = ConfigData.minSdk
         targetSdk = ConfigData.targetSdk
-        versionCode = 8
-        versionName = "1.7"
+        versionCode = 9
+        versionName = "1.8"
 
         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
         vectorDrawables {

BIN
app/release/app-release.aab


BIN
buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin


BIN
buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin


BIN
buildSrc/build/libs/buildSrc.jar


+ 8 - 6
feature/weather/src/main/java/com/trifork/feature/weather/presentation/components/WeatherScreen.kt

@@ -216,12 +216,14 @@ fun WeatherScreen(
                 ) {
                     Box(Modifier.pullRefresh(pullRefreshState)) {
 
-                        LazyColumn {
-                            item {
-                                WeatherCard(
-                                    data = state.weatherInfo.currentWeatherData!!,
-                                    backgroundColor = MaterialTheme.colorScheme.primaryContainer
-                                )
+                        state.weatherInfo.currentWeatherData?.let {
+                            LazyColumn {
+                                item {
+                                    WeatherCard(
+                                        data = it,
+                                        backgroundColor = MaterialTheme.colorScheme.primaryContainer
+                                    )
+                                }
                             }
                         }