1
1
package dev.johnoreilly.climatetrace.ui
2
2
3
3
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
7
4
import androidx.compose.animation.fadeIn
8
5
import androidx.compose.animation.fadeOut
9
6
import androidx.compose.foundation.background
@@ -83,7 +80,7 @@ class ClimateTraceScreen: Screen {
83
80
84
81
@Composable
85
82
fun CountryScreenSuccess (countryList : List <Country >) {
86
- val windowAdaptiveInfo = currentWindowAdaptiveInfo() // calculateWindowSizeClass()
83
+ val windowAdaptiveInfo = currentWindowAdaptiveInfo()
87
84
val countryDetailsViewModel = koinInject<CountryDetailsViewModel >()
88
85
val countryDetailsViewState by countryDetailsViewModel.viewState.collectAsState()
89
86
var selectedCountry by remember { mutableStateOf<Country ?>(null ) }
@@ -93,13 +90,9 @@ fun CountryScreenSuccess(countryList: List<Country>) {
93
90
val animatedSize = if (panelState.splitter.isResizing) {
94
91
if (panelState.isExpanded) panelState.expandedSize else panelState.collapsedSize
95
92
} 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
100
94
}
101
95
102
-
103
96
Row (Modifier .fillMaxSize()) {
104
97
val windowSizeClass = windowAdaptiveInfo.windowSizeClass
105
98
if (windowSizeClass.windowWidthSizeClass == WindowWidthSizeClass .COMPACT ) {
0 commit comments