mirror of
https://github.com/PranshulGG/WeatherMaster.git
synced 2026-10-22 02:52:37 -05:00
clean up
This commit is contained in:
1 parent
4d04f61356
commit
e595a178cd
4 files changed
+32
-4
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
+9
-4
@@ -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(
|
||||
|
||||
@@ -470,6 +470,20 @@
|
||||
<string name="widget_weather_today_max_uv">Today\'s max: %1$s</string>
|
||||
<string name="widget_weather_today_max_uv_at">At around %1$s</string>
|
||||
|
||||
<string name="country_united_kingdom">United Kingdom</string>
|
||||
<string name="region_europe">Europe</string>
|
||||
|
||||
<string name="settings_api_key_config">API keys config</string>
|
||||
|
||||
<string name="source_regional_global">Regional with Global Coverage</string>
|
||||
|
||||
<string name="error_no_api_key">No API key found. Please add your API key in the settings</string>
|
||||
|
||||
|
||||
<string name="weather_mixed_precipitation">Mixed precipitation</string>
|
||||
<string name="weather_hail">Hail</string>
|
||||
<string name="weather_sleet">Sleet</string>
|
||||
|
||||
</resources>
|
||||
|
||||
<!--<string name=""></string>-->
|
||||
Reference in new issue
Block a user