bump version to 3.1.0, update AboutScreen UI styling, fix onAction callback in AboutScreenViewModel, and conditionalize widget updates in WeatherViewModel

This commit is contained in:
PranshulGG committed 2026-05-26 11:56:11 +05:30
1 parent 3e0290be66
commit de3ad2417f
6 files changed
+13 -11

No files matched your search

+2 -2
View File
@@ -4,10 +4,10 @@
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2026-05-25T09:26:35.198520700Z">
<DropdownSelection timestamp="2026-05-26T06:11:45.027225800Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\hukam\.android\avd\Pixel_10_Pro.avd" />
<DeviceId pluginId="PhysicalDevice" identifier="serial=0611631137014982" />
</handle>
</Target>
</DropdownSelection>
+2 -1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="temurin-21" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
+2 -2
View File
@@ -32,8 +32,8 @@ android {
applicationId = "com.pranshulgg.weather_master_app"
minSdk = 24
targetSdk = 36
versionCode = 47
versionName = "3.0.0"
versionCode = 48
versionName = "3.1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -86,8 +86,9 @@ fun AboutScreen(navController: NavController) {
)
Gap(12.dp)
Text(
"WeatherMaster",
style = MaterialTheme.typography.displayMedium,
"WEATHERMASTER",
style = MaterialTheme.typography.headlineMedium,
color = MaterialTheme.colorScheme.onSurface,
fontFamily = weatherMasterTitleFont
)
@@ -23,8 +23,6 @@ class AboutScreenViewModel @Inject constructor(
var loading by mutableStateOf(false)
private set
var isAvailable by mutableStateOf(false)
private set
suspend fun isNewVersionAvailable(currentTag: String, onAction: () -> Unit) {
loading = true
@@ -44,7 +42,7 @@ class AboutScreenViewModel @Inject constructor(
if (result) {
SnackbarManager.show(R.string.message_new_version_available, onAction = {
onAction
onAction()
}, actionLabel = R.string.action_view)
} else {
SnackbarManager.show(R.string.message_using_latest_version)
@@ -245,7 +245,9 @@ class WeatherViewModel @Inject constructor(
}
// UPDATE WIDGETS, Run the worker once
WeatherUpdateScheduler.startNow(context, skipForegroundCheck = true)
if (location.isDefault) {
WeatherUpdateScheduler.startNow(context, skipForegroundCheck = true)
}
}
private suspend fun handleAirQuality(location: Location, isManualRefresh: Boolean) {