@momo-kits/native-kits 0.162.11-debug → 0.162.12-debug
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
|
@@ -42,7 +42,9 @@ fun NavigationContainer(
|
|
|
42
42
|
|
|
43
43
|
val resolvedLocalize = localize ?: fallbackLocalize
|
|
44
44
|
|
|
45
|
-
var observerFontScaleConfig by remember
|
|
45
|
+
var observerFontScaleConfig by remember(maxApi) {
|
|
46
|
+
mutableStateOf(seedFontScaleConfig(maxApi) ?: mergedContext?.fontScaleConfig)
|
|
47
|
+
}
|
|
46
48
|
LaunchedEffect(maxApi, resolvedLocalize) {
|
|
47
49
|
val api = maxApi ?: return@LaunchedEffect
|
|
48
50
|
runCatching {
|
|
@@ -159,6 +161,11 @@ private fun parseLanguage(raw: Map<String, Any?>?): String? {
|
|
|
159
161
|
return if (code.startsWith(Localize.EN)) Localize.EN else Localize.VI
|
|
160
162
|
}
|
|
161
163
|
|
|
164
|
+
private fun seedFontScaleConfig(maxApi: IMaxApi?): FontScaleConfig? {
|
|
165
|
+
val raw = runCatching { maxApi?.getItem(FONT_SCALE_OBSERVER_KEY) }.getOrNull()
|
|
166
|
+
return parseFontScaleConfig(raw)
|
|
167
|
+
}
|
|
168
|
+
|
|
162
169
|
private fun parseFontScaleConfig(raw: Map<String, Any?>?): FontScaleConfig? {
|
|
163
170
|
if (raw.isNullOrEmpty()) return null
|
|
164
171
|
@Suppress("UNCHECKED_CAST")
|
|
@@ -40,14 +40,7 @@ coil-multiplatform-compose = { module = "io.coil-kt.coil3:coil-compose", version
|
|
|
40
40
|
coil-multiplatform-network-ktor = { module = "io.coil-kt.coil3:coil-network-ktor3", version.ref = "coil3-multiplatform" }
|
|
41
41
|
r8 = { module = "com.android.tools:r8", version.ref = "r8" }
|
|
42
42
|
airbnb-lottie = { group = "com.airbnb.android", name = "lottie-compose", version.ref = "airbnb-lottie" }
|
|
43
|
-
# AI-GENERATED START
|
|
44
|
-
# Depend on compottie-core (not the `compottie` umbrella). The umbrella drags in the
|
|
45
|
-
# separate `keight` umbrella artifact, which collides with `keight-core` on the
|
|
46
|
-
# `findRoot__at__ScriptRuntime` symbol (duplicate symbol at the iOS `ld` link of
|
|
47
|
-
# shared.framework). compottie-core pulls only `keight-core` (which declares
|
|
48
|
-
# keight.js.JsAny, so the earlier unlinked-symbol error stays fixed too).
|
|
49
43
|
compottie = { module = "io.github.alexzhirkevich:compottie-core", version.ref = "compottie" }
|
|
50
|
-
# AI-GENERATED END
|
|
51
44
|
native-max-api = { group = "vn.momo.maxapi", name = "NativeMaxApi", version.ref = "nativemaxapi" }
|
|
52
45
|
kits = { module = "vn.momo.kits:kits", version.ref = "kits" }
|
|
53
46
|
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
|
package/gradle.properties
CHANGED