1.3.1 - Graphing Fixes Cont'd

This commit is contained in:
2025-08-31 19:03:43 -06:00
parent 8db6ed0e82
commit 4804049274
2 changed files with 6 additions and 8 deletions

View File

@@ -16,8 +16,8 @@ android {
applicationId = "com.atridad.openclimb" applicationId = "com.atridad.openclimb"
minSdk = 34 minSdk = 34
targetSdk = 36 targetSdk = 36
versionCode = 19 versionCode = 20
versionName = "1.3.0" versionName = "1.3.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@@ -132,14 +132,12 @@ fun ProgressChartCard(
progressData: List<ProgressDataPoint>, progressData: List<ProgressDataPoint>,
problems: List<com.atridad.openclimb.data.model.Problem>, problems: List<com.atridad.openclimb.data.model.Problem>,
) { ) {
// Find all grading systems that have been used // Find all grading systems that have been used in the progress data
val usedSystems = remember(problems) { val usedSystems = remember(progressData) {
problems.map { it.difficulty.system }.distinct().filter { system -> progressData.map { it.difficultySystem }.distinct()
problems.any { it.difficulty.system == system }
}
} }
var selectedSystem by remember { var selectedSystem by remember(usedSystems) {
mutableStateOf(usedSystems.firstOrNull() ?: DifficultySystem.V_SCALE) mutableStateOf(usedSystems.firstOrNull() ?: DifficultySystem.V_SCALE)
} }
var expanded by remember { mutableStateOf(false) } var expanded by remember { mutableStateOf(false) }