@momo-kits/native-kits 0.89.33-beta.32 → 0.89.33-beta.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/compose/build.gradle.kts
CHANGED
|
@@ -32,6 +32,7 @@ import androidx.compose.ui.unit.Dp
|
|
|
32
32
|
import androidx.compose.ui.unit.dp
|
|
33
33
|
import androidx.compose.ui.unit.min
|
|
34
34
|
import androidx.compose.ui.zIndex
|
|
35
|
+
import kotlinx.serialization.Serializable
|
|
35
36
|
import kotlinx.serialization.json.Json
|
|
36
37
|
import vn.momo.kits.components.InputSearchProps
|
|
37
38
|
import vn.momo.kits.const.AppStatusBar
|
|
@@ -48,7 +49,8 @@ enum class HeaderType {
|
|
|
48
49
|
NONE
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
@Serializable
|
|
53
|
+
data class ConfigData(val headerBanner: String? = null)
|
|
52
54
|
|
|
53
55
|
@Composable
|
|
54
56
|
fun Screen(
|
|
@@ -84,7 +86,7 @@ fun Screen(
|
|
|
84
86
|
|
|
85
87
|
val platformApi = PlatformApi.current
|
|
86
88
|
val rawData = platformApi.request("GetConfig", "DESIGN_SYSTEM")
|
|
87
|
-
val json = Json {ignoreUnknownKeys = true}
|
|
89
|
+
val json = Json { ignoreUnknownKeys = true }
|
|
88
90
|
val headerBanner = json.decodeFromString<ConfigData>(rawData).headerBanner
|
|
89
91
|
|
|
90
92
|
val indicator = WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()
|
|
@@ -103,7 +105,11 @@ fun Screen(
|
|
|
103
105
|
) {
|
|
104
106
|
|
|
105
107
|
if (animatedHeader === null) {
|
|
106
|
-
HeaderBackground(
|
|
108
|
+
HeaderBackground(
|
|
109
|
+
headerType = headerType,
|
|
110
|
+
scrollState = scrollState.value,
|
|
111
|
+
headerBanner = headerBanner
|
|
112
|
+
)
|
|
107
113
|
} else {
|
|
108
114
|
Box(
|
|
109
115
|
Modifier.zIndex(2f)
|