diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/navigation/AppNavHost.kt b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/navigation/AppNavHost.kt
index 8c199e909..030f0c736 100644
--- a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/navigation/AppNavHost.kt
+++ b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/navigation/AppNavHost.kt
@@ -25,6 +25,7 @@ import androidx.navigation.compose.navigation
import androidx.navigation.navArgument
import com.pranshulgg.weather_master_app.core.model.domain.weather.WeatherBlockType
import com.pranshulgg.weather_master_app.feature.alerts.AlertsScreen
+import com.pranshulgg.weather_master_app.feature.apikeyconfig.ApiKeysConfigScreen
import com.pranshulgg.weather_master_app.feature.blocks.screens.SunMoonScreen
import com.pranshulgg.weather_master_app.feature.blocks.screens.airquality.AirQualityScreen
import com.pranshulgg.weather_master_app.feature.blocks.screens.humidity.HumidityScreen
@@ -174,6 +175,7 @@ fun AppNavHost(
) {
WorkerInfoScreen(navController)
}
+
composable(
route = "${NavRoutes.EDIT_LOCATION}/{locationId}",
arguments = listOf(
@@ -223,6 +225,11 @@ fun AppNavHost(
NavRoutes.AIR_QUALITY -> AirQualityScreen(navController, index, locationId)
}
}
+ composable(
+ NavRoutes.API_KEYS_CONFIG
+ ) {
+ ApiKeysConfigScreen(navController)
+ }
}
}
diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/navigation/NavRoutes.kt b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/navigation/NavRoutes.kt
index 71a9443bd..ff6b137dc 100644
--- a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/navigation/NavRoutes.kt
+++ b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/navigation/NavRoutes.kt
@@ -49,6 +49,8 @@ object NavRoutes {
const val ALERTS = "alerts"
+ const val API_KEYS_CONFIG = "api_keys_config"
+
fun alerts(locationId: String): String {
return "$ALERTS/$locationId"
}
diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/main/components/CreditsBottomSection.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/main/components/CreditsBottomSection.kt
index f0fd7a78d..60fc4e98c 100644
--- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/main/components/CreditsBottomSection.kt
+++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/main/components/CreditsBottomSection.kt
@@ -24,14 +24,19 @@ import com.pranshulgg.weather_master_app.R
@Composable
fun CreditsBottomSection(weather: Weather?, onClick: () -> Unit) {
- val source = weather?.location?.source?.displayName
+ val source = weather?.location?.source
+
+ val sourceString = source?.displayName
?: WeatherSource.OPEN_METEO.displayName
- val countryString =
- if (weather?.location?.source?.countryNameRes != null) " (${stringResource(weather.location.source.countryNameRes)})" else ""
+ val countryString = buildString {
+ if (source?.countryNameRes != null) {
+ append("(${stringResource(weather.location.source.countryNameRes)})")
+ }
+ }
Text(
- stringResource(R.string.source_credits_label, "$source $countryString"),
+ stringResource(R.string.source_credits_label, "$sourceString $countryString"),
modifier = Modifier
.fillMaxWidth()
.clickable(
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7c2967d49..9d1db53a5 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -470,6 +470,20 @@
Today\'s max: %1$s
At around %1$s
+ United Kingdom
+ Europe
+
+ API keys config
+
+ Regional with Global Coverage
+
+ No API key found. Please add your API key in the settings
+
+
+ Mixed precipitation
+ Hail
+ Sleet
+