Skip to content

Commit fcf2d83

Browse files
authored
Merge pull request #108 from joreilly/update_dependencies
update dependencies + workaround for panel expanding issue
2 parents 05b8d04 + d937ec6 commit fcf2d83

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

composeApp/src/commonMain/kotlin/dev/johnoreilly/climatetrace/ui/ClimateTraceScreen.kt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package dev.johnoreilly.climatetrace.ui
22

33
import androidx.compose.animation.AnimatedVisibility
4-
import androidx.compose.animation.core.Spring
5-
import androidx.compose.animation.core.SpringSpec
6-
import androidx.compose.animation.core.animateDpAsState
74
import androidx.compose.animation.fadeIn
85
import androidx.compose.animation.fadeOut
96
import androidx.compose.foundation.background
@@ -83,7 +80,7 @@ class ClimateTraceScreen: Screen {
8380

8481
@Composable
8582
fun CountryScreenSuccess(countryList: List<Country>) {
86-
val windowAdaptiveInfo = currentWindowAdaptiveInfo() // calculateWindowSizeClass()
83+
val windowAdaptiveInfo = currentWindowAdaptiveInfo()
8784
val countryDetailsViewModel = koinInject<CountryDetailsViewModel>()
8885
val countryDetailsViewState by countryDetailsViewModel.viewState.collectAsState()
8986
var selectedCountry by remember { mutableStateOf<Country?>(null) }
@@ -93,13 +90,9 @@ fun CountryScreenSuccess(countryList: List<Country>) {
9390
val animatedSize = if (panelState.splitter.isResizing) {
9491
if (panelState.isExpanded) panelState.expandedSize else panelState.collapsedSize
9592
} else {
96-
animateDpAsState(
97-
if (panelState.isExpanded) panelState.expandedSize else panelState.collapsedSize,
98-
SpringSpec(stiffness = Spring.StiffnessLow)
99-
).value
93+
if (panelState.isExpanded) panelState.expandedSize else panelState.collapsedSize
10094
}
10195

102-
10396
Row(Modifier.fillMaxSize()) {
10497
val windowSizeClass = windowAdaptiveInfo.windowSizeClass
10598
if (windowSizeClass.windowWidthSizeClass == WindowWidthSizeClass.COMPACT) {

composeApp/src/commonMain/kotlin/dev/johnoreilly/climatetrace/ui/utils/ResizablePanel.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import androidx.compose.material3.Icon
88
import androidx.compose.material3.LocalContentColor
99
import androidx.compose.material3.Text
1010
import androidx.compose.material.icons.Icons
11+
import androidx.compose.material.icons.automirrored.filled.ArrowBack
12+
import androidx.compose.material.icons.automirrored.filled.ArrowForward
1113
import androidx.compose.material.icons.filled.ArrowBack
1214
import androidx.compose.material.icons.filled.ArrowForward
1315
import androidx.compose.runtime.Composable
@@ -59,7 +61,7 @@ fun ResizablePanel(
5961
verticalAlignment = Alignment.CenterVertically
6062
) {
6163
Icon(
62-
if (state.isExpanded) Icons.Default.ArrowBack else Icons.Default.ArrowForward,
64+
if (state.isExpanded) Icons.AutoMirrored.Filled.ArrowBack else Icons.AutoMirrored.Filled.ArrowForward,
6365
contentDescription = if (state.isExpanded) "Collapse" else "Expand",
6466
tint = LocalContentColor.current,
6567
modifier = Modifier

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ agp = "8.5.2"
88
android-compileSdk = "34"
99
android-minSdk = "24"
1010
android-targetSdk = "34"
11-
androidx-activityCompose = "1.9.1"
12-
compose = "1.7.0-beta06"
13-
compose-plugin = "1.7.0-alpha03"
11+
androidx-activityCompose = "1.9.2"
12+
compose = "1.7.1"
13+
compose-plugin = "1.7.0-beta02"
1414
composeAdaptiveLayout = "1.0.0-alpha01"
1515
harawata-appdirs = "1.2.2"
1616
koalaplot = "0.5.3"

0 commit comments

Comments
 (0)