@momo-kits/native-kits 0.162.2-test.7-debug → 0.162.2-test.8-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.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.162.2-test.7-debug"
43
+ version = "0.162.2-test.8-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -38,16 +38,12 @@ fun NavigationContainer(
38
38
  val parentContext = ApplicationContext.current
39
39
  val mergedContext = MiniAppContext.merge(parentContext, applicationContext)
40
40
 
41
- // FontScaleConfig the host writes to observer storage (single source of truth when present).
42
- var observerFontScaleConfig by remember { mutableStateOf<FontScaleConfig?>(null) }
41
+ // Default = the host-seeded fontScaleConfig from the merged context, so the first frame is
42
+ // already scaled (no flash). The observer below overwrites it on later host writes (live rate
43
+ // changes); a null emit (host cleared) falls back to the ambient LocalFontScaleConfig default.
44
+ var observerFontScaleConfig by remember { mutableStateOf(mergedContext?.fontScaleConfig) }
43
45
  LaunchedEffect(maxApi) {
44
46
  val api = maxApi ?: return@LaunchedEffect
45
- // getDataObserver = snapshot at mount; observer = subscribe to later host writes.
46
- runCatching {
47
- api.getDataObserver(FONT_SCALE_OBSERVER_KEY) { data ->
48
- parseFontScaleConfig(data)?.let { observerFontScaleConfig = it }
49
- }
50
- }
51
47
  runCatching {
52
48
  api.observer(FONT_SCALE_OBSERVER_KEY).collect { data ->
53
49
  observerFontScaleConfig = parseFontScaleConfig(data)
@@ -82,7 +78,7 @@ fun NavigationContainer(
82
78
  ApplicationContext provides mergedContext,
83
79
  AppConfig provides config,
84
80
  AppLanguage provides language,
85
- LocalFontScaleConfig provides (observerFontScaleConfig ?: mergedContext?.fontScaleConfig ?: LocalFontScaleConfig.current),
81
+ LocalFontScaleConfig provides (observerFontScaleConfig ?: LocalFontScaleConfig.current),
86
82
  ) {
87
83
  LaunchedEffect(Unit) {
88
84
  setNavigator?.invoke(navigator)
package/gradle.properties CHANGED
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
18
18
  name="ComposeKits"
19
19
  group=vn.momo.kits
20
20
  artifact.id=kits
21
- version=0.162.2-test.7
21
+ version=0.162.2-test.8
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.162.2-test.7-debug",
3
+ "version": "0.162.2-test.8-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},